Commit Graph

2227 Commits (b83e7b42bbdd5fd912a50af52c8cfd00e8f31d29)

Author SHA1 Message Date
Phillip Webb 5ae061f491 Merge branch '1.5.x' into 2.0.x 7 years ago
Phillip Webb 40800355c7 Merge branch '2.0.x' 7 years ago
Phillip Webb 09fa1e7e11 Polish 7 years ago
Johnny Lim de01e7aad4 Polish
See gh-13243
7 years ago
Stephane Nicoll f91b53747a Merge branch '2.0.x' 7 years ago
Johnny Lim f385a1cb11 Polish
Closes gh-13243
7 years ago
Stephane Nicoll 7462401291 Merge branch '2.0.x' 7 years ago
Eddú Meléndez 065eebfb4b Fix javadoc
Closes gh-13274
7 years ago
Phillip Webb 68ffbafbae Fix checkstyle violations 7 years ago
Phillip Webb 3702da4573 Formatting 7 years ago
Phillip Webb d8157c94f3 Merge branch '2.0.x' 7 years ago
Phillip Webb 21d80d87a3 Merge branch '1.5.x' into 2.0.x 7 years ago
Phillip Webb 40e68a6427 Merge branch '2.0.x' 7 years ago
Phillip Webb 6d8b4710d7 Merge branch '1.5.x' into 2.0.x 7 years ago
Stephane Nicoll afe6abb20d Merge branch '2.0.x' 7 years ago
Johnny Lim 75639aa682 Polish
Closes gh-13192
7 years ago
Stephane Nicoll ffdcdc0dc6 Merge branch '2.0.x' 7 years ago
Stephane Nicoll 7b7e802129 Merge branch '1.5.x' into 2.0.x 7 years ago
Stephane Nicoll ed02d02d19 Polish "Allow repackage maven goal to take a source classifier"
Closes gh-11061
7 years ago
Björn 3c8e012411 Allow repackage maven goal to take a source classifier
Previously, the "classifier" attribute was only used to determine the
target classifier of the repackaged archive, always using the main
artifact as the source.

This commit changes the semantic of the attribute so that an existing
archive matching the "classifier" attribute can be used as source,
replacing the archive the same way the goal replaces the main archive
if no classifier is found.

If no artifact with the specified classifier exists, the repackaged
archive is still processed based on the main archive and attached to
the lifecycle using the value of the classifier attribute.

See gh-11061
7 years ago
Johnny Lim fb2ab67f4f Polish
Closes gh-13148
7 years ago
Stephane Nicoll b17c58b114 Merge branch '2.0.x' 7 years ago
Johnny Lim 3dd2f5bb05 Polish
See gh-13148
7 years ago
Stephane Nicoll ae74ce9b39 Merge branch '2.0.x' 7 years ago
Vedran Pavic a08fa27c39 Add .gitignore for Gradle Plugin module
Closes gh-13137
7 years ago
Stephane Nicoll b0433d66c1 Merge branch '2.0.x' 7 years ago
dreis2211 e6a23fa3ff Remove unnecessary semicolons
Closes gh-13144
7 years ago
Andy Wilkinson 079b67c53b Merge branch '2.0.x' 7 years ago
Andy Wilkinson 7913d9b599 Add methods to BootJar for adding content to BOOT-INF
Closes gh-13000
7 years ago
Andy Wilkinson 07251a09d1 Merge branch '2.0.x' 7 years ago
Andy Wilkinson d9d7499ae6 Merge branch '1.5.x' into 2.0.x 7 years ago
Stephane Nicoll 00a43d8f4d Merge branch '2.0.x' 7 years ago
Johnny Lim 75e591e76e Polish
Closes gh-13130
7 years ago
Stephane Nicoll 3ad8f3fcbf Merge branch '2.0.x' 7 years ago
Stephane Nicoll 9dccf5b895 Polish
See gh-13078
7 years ago
Stephane Nicoll 7f50d49251 Merge branch '2.0.x' 7 years ago
dreis2211 15d67d6b12 Remove MockServletWebServer.emptyEnumeration()
Closes gh-13084
7 years ago
Phillip Webb 7b120c1c97 Formatting 7 years ago
Phillip Webb 42c053cf1b Merge branch '2.0.x' 7 years ago
Phillip Webb 5b3cb8a698 Update copyright header year for changed files 7 years ago
Phillip Webb 6e09e497f2 Formatting 7 years ago
Andy Wilkinson 65e6011b7f Merge branch '2.0.x' 7 years ago
Andy Wilkinson 2bcf29913d Skip building the Gradle plugin on Java 9 as well as 10
Upgrading the JDK 9-based build to use JDK 9.0.4 has revealed that
Gradle 4.0.x doesn't work with it as it fails to parse the 9.0.4
version number.

This commit disables building the Gradle plugin on Java 9 (as we
had already done for Java 10) until we decide what to do
(see gh-12333).
7 years ago
Phillip Webb b6a2a46f78 Merge branch '2.0.x' 7 years ago
Phillip Webb 2d70a7ae5e Polish caught exception names
Prefer `ex` over `e`.
7 years ago
Phillip Webb 41efea51a7 Polish ternary expressions
Consistently format ternary expressions and always favor `!=` as the
the check.
7 years ago
Phillip Webb 8c0c0ee55a Merge branch '2.0.x' 7 years ago
Phillip Webb e125085993 Merge branch '1.5.x' into 2.0.x 7 years ago
Andy Wilkinson 4ea7d3a767 Merge branch '2.0.x' 7 years ago
Andy Wilkinson f5fabbc1b9 Remove the use of internal API from Gradle Plugin's BootJar
Closes gh-13037
7 years ago
Stephane Nicoll 4eeddbd889 Merge branch '2.0.x' 7 years ago
Stephane Nicoll 79c222da78 Allow to provide manual metadata for keys that are not unique
Closes gh-12193
7 years ago
Stephane Nicoll 44fd7d953e Merge branch '2.0.x' 7 years ago
Stephane Nicoll 782d8c63da Merge branch '1.5.x' into 2.0.x 7 years ago
Andy Wilkinson 0526594a3c Merge branch '2.0.x' 7 years ago
Andy Wilkinson f019d5c85b Merge branch '1.5.x' into 2.0.x 7 years ago
Madhura Bhave a193c89c6d Merge branch '2.0.x' 7 years ago
Madhura Bhave aad279208e Throw exception if RandomAccessData tries to read beyond EOF
Fixes gh-12986
7 years ago
Stephane Nicoll 335ca62239 Merge branch '2.0.x' 7 years ago
Johnny Lim a723ac95a9 Polish
Closes gh-12999
7 years ago
Stephane Nicoll 080e189d06 Fix broken syntax 7 years ago
Stephane Nicoll fd47b728c1 Properly handle values with spaces
Closes gh-10741
7 years ago
Stephane Nicoll d4729f5389 Polish 7 years ago
Stephane Nicoll 40b7e02793 Polish "Add support for environment variables"
Closes gh-12800
7 years ago
Dmytro Nosan 95f7e3ca37 Add support for environment variables
See gh-12800
7 years ago
Stephane Nicoll 5dd4a7e91e Merge branch '2.0.x' 7 years ago
Stephane Nicoll 55ef9e6dc9 Deprecate excludeArtifactIds
While being able to exclude all artifacts of a given group is a handy
feature, excluding all artifacts with a given artifactId does not make
much sense as it should refer to a single artifact anyway. Also the
general "exclude" mechanism is meant to do the exact same thing.

Closes gh-12885
7 years ago
Andy Wilkinson 099f61ae6d Merge branch '2.0.x' 7 years ago
Andy Wilkinson c9f04c3977 Avoid race between container starting and getting mapped port 7 years ago
Stephane Nicoll 03539d8e16 Polish "Add system properties support using explicit configuration tag"
Closes gh-10741
7 years ago
Vadeg ba34bf6470 Add system properties support using explicit configuration tag
See gh-10741
7 years ago
Andy Wilkinson fe497d70b8 Merge branch '2.0.x' 7 years ago
Andy Wilkinson f6cc1cbd76 Make Testcontainer wait strategies final 7 years ago
Andy Wilkinson c9b2afbd1e Merge branch '2.0.x' 7 years ago
Andy Wilkinson f39cea0428 Try to stabilize build by giving Cassandra longer to start 7 years ago
Andy Wilkinson 6c504a5098 Fix deprecation warnings in Testcontainers wait strategies
See gh-12821
7 years ago
Andy Wilkinson 60bf4ef430 Merge branch '2.0.x' 7 years ago
Andy Wilkinson a5f3f36b58 Test the Gradle plugin against Gradle 4.7
Closes gh-12952
7 years ago
Andy Wilkinson 15a70153c1 Merge branch '2.0.x' 7 years ago
Andy Wilkinson 72ec2c8644 Polish “Only analyze configurations that we've registered to check”
Closes gh-12784
7 years ago
danhyun 1e447ebfbf Only analyze configurations that we've registered to check
See gh-12784
7 years ago
Andy Wilkinson 806978b8f1 Test unresolved dependency analysis in the Gradle plugin
See gh-12784
7 years ago
Stephane Nicoll 719fcb4038 Merge branch '2.0.x' 7 years ago
dreis2211 a930835b92 Replace <code> tags where possible
Closes gh-12922
7 years ago
Stephane Nicoll c43eb89823 Make sure that finalName is read only
Closes gh-12608
7 years ago
Madhura Bhave 9c7612e681 Fix NPE in WaitStrategy used for test containers 7 years ago
Andy Wilkinson f335ec00bf Polish 7 years ago
Phillip Webb 685babc829 Polish "Use lambdas for map entry iteration where possible"
Closes gh-12626
7 years ago
igor-suhorukov 69bc19e0ca Use lambdas for map entry iteration where possible
See gh-12626
7 years ago
Phillip Webb 696aedaef8 Merge branch '1.5.x' 7 years ago
Phillip Webb 9a64d3bf3f Fix AsciiBytes unicode decoding
Fix the decoding logic in the AsciiBytes `hashCode` and `matches` to
correctly deal with multi-byte encodings.

Fixes gh-12504
7 years ago
Phillip Webb 98a2a91d16 Polish 7 years ago
Madhura Bhave 8b29823885 Prevent StackOverFlowException in metadata processor
Fixes gh-11037
7 years ago
Andy Wilkinson 1f35abacd6 Polish “Configure Kotlin compiler to use -java-parameters by default”
Closes gh-12641
7 years ago
Rui Figueira 5e2726f896 Configure Kotlin compiler to use -java-parameters by default
See gh-12641
7 years ago
Stephane Nicoll 006decea2a Merge branch '1.5.x' 7 years ago
Phillip Webb 79ad03b584 Merge branch '1.5.x' 7 years ago
Andy Wilkinson 36ea387a67 Close RandomAccessDataFile when direct JarFile is closed
Previously, the underlying RandomAccessDataFile was not closed when
the JarFile that was using it was closed. This causes a problem on
Windows as the open file handle prevents the file from being deleted.

This commit updates JarFile to close the underlying
RandomAccessDataFile when it is closed and has a JarFileType of
DIRECT.

Previously, when accessing the manifest of a jar file that maps to a
nested directory (BOOT-INF/classes) a new JarFile was created from the
root jar file, the manifest was retrieved, and the new JarFile was
closed. This could lead to the underlying RandomAccessDataFile being
closed while it was still in use.

This commit improves JarFile to retrieve the manifest from the
existing outer JarFile, thereby avoiding the need to create and close
a new JarFile.

Unfortunately, PropertiesLauncher creates a number of scenarios where
a JarFile with a type of direct is closed while it’s still being used.
To accommodate this behaviour, RandomAccessDataFile has been updated
so that it can re-open the underlying RandomAccessFile if it is used
after it has been closed.

Closes gh-12296
7 years ago
Phillip Webb a4b0be089d Polish 7 years ago
dreis2211 0d3f3e46dd Fix typos
Closes gh-12468
7 years ago
Stephane Nicoll ed05e1f7ca Polish "Reorder modifiers to comply with the JLS"
Closes gh-12432
7 years ago
igor-suhorukov aebb475bc5 Reorder modifiers to comply with the JLS
See gh-12432
7 years ago
Andy Wilkinson 6d16c5ff6e Omit libraries with null destination when repackaging
Closes gh-12437
7 years ago
igor-suhorukov 4f4cc1569c Polish
Declarations should use Java collection interfaces such as "Deque" rather
than specific implementation classes such as "LinkedList".

Closes gh-12405
7 years ago
Stephane Nicoll 7d1faa1c88 Ignore static and abstract accessors
This commit updates the annotation processor and the binder to ignore
any static or abstract method that has the characteristics of a JavaBean
accessor. As a result, no property is generated for those (invalid)
accessor and no binding occurs on them either.

Closes gh-12390
7 years ago
Andy Wilkinson f918e0eb6a Merge branch '1.5.x' 7 years ago
dreis2211 3adced9962 Remove workaround for JDK-8023130 in RunProcess
With JDK 8 being the baseline and JDK 7 not being supported anymore we
can get rid of the workaround for a JDK 7 bug in
ProcessBuilder.inheritIO on Windows machines.

Closes gh-12337
7 years ago
Johnny Lim 751c444166 Polish
See gh-12326
7 years ago
Andy Wilkinson 3370c23ab9 Skip the Gradle plugin when building with the full profile and JDK 10
See gh-12028
7 years ago
Andy Wilkinson 2b1252e282 Skip the Gradle Plugin when building with JDK 10
Previously, the JDK 10 build would fail as we build the plugin using
Gradle 4.0.x (the lowest version of Gradle that we support) and
Gradle 4.0.x doesn't work with Java 10.

Upgrading to Gradle 4.1, which appears to work with Java 10, was
considered but rejected for now as it introduces the risk that we
inadvertently use an API that's new in 4.1 and break our 4.0 support.

This commit goes for the extreme option and disables building the
Gradle Plugin when building with JDK.

See gh-12028
7 years ago
Andy Wilkinson 4a3e0a231c Test the Gradle plugin against Gradle 4.6
Closes gh-12314
7 years ago
Andy Wilkinson e4a1fed3b8 Test the Gradle plugin against Gradle 4.6 7 years ago
Andy Wilkinson 188d120c9c Test the Gradle plugin against Gradle 4.5.1
Closes gh-12315
7 years ago
Andy Wilkinson 8d1e69bca4 Polish Gradle plugin's javadoc 7 years ago
Andy Wilkinson 703de64842 Reinstate imports 7 years ago
Phillip Webb 7bc535e4fa Polish 7 years ago
Stephane Nicoll 4180762d6d Polish contribution
Closes gh-12236
7 years ago
igor-suhorukov 56cbc65e7b Polish
See gh-12236
7 years ago
Andy Wilkinson 9640881f38 Fix BuildInfo up-to-date check when group, name, or version changes
Previously, if the project's group, name, or version changed the
BuildInfo task would still be considered up-to-date as the values of
the project's properties were not reflected in the fields of the
BuildInfo instance.

This commit updates BuildInfo to copy the value of the project's
property to the corresponding BuildInfo field when the property is
read using its getter method on BuildInfo.

Closes gh-12266
7 years ago
Phillip Webb 3e4da3cc37 Polish 7 years ago
Andy Wilkinson fdb9a1ea8f Consider time in BuildInfo up-to-date checks and allow it to be set
Closes gh-12111
Closes gh-12266
7 years ago
Andy Wilkinson 30f79f2fb1 Use application name as convention for distribution's base name
Closes gh-12232
7 years ago
Andy Wilkinson 60ac2e5c09 Reduce the amount of garbage produced by JarFile
Previously, working with a JarFile created a large amount of garbage
that was allocated on the thread local allocation buffer (TLAB).
The TLAB allocations made a significant contribution to GC pressure
and slowed down startup. This commit reduces the amount of garbage
by making a number of changes.

Reading from a RandomAccessDataFile has been reworked to avoid
creating new RandomAccessFile instances. A single RandomAccessFile
is now created for an entire jar file and it is used to read data from
anywhere in that jar file, including entries in nested jar files. To
ensure that reads remain thread-safe, a lock is taken on the
RandomAccessFile that is shared by all RandomAccessDataFile instances
that are provided access to (portions of) the same jar file.

Reading all of the bytes from a RandomAccessData has been reworked to
avoid the use of an InputStream that was created, used to read the
data, and then thrown away. In place of the InputStream-based
mechanism a method has been introduced that returns all of the
RandomAccessData as a byte[]. Building on this change, a method has
also been introduced to read a portion of a RandomAccessData as a
byte[]. This avoids the need to create a new RandomAccessData
subsection where the subsection was only used to read its entire
contents and then thrown away.

Decoding of an MS-DOS datetime has been reworked to use LocalDataTime
rather than GregorianCalendar. The former produces less garbage than
the latter.

Closes gh-12226
7 years ago
Phillip Webb 29c3be3590 Polish 7 years ago
Stephane Nicoll 306c79f0de Merge branch '1.5.x' 7 years ago
igor-suhorukov 98f4692c62 Polish
This commit changes invocations to immediately return the expression
instead of assigning it to a temporary variable. The method name should
be sufficient for callers to know exactly what will be returned.

Closes gh-12211
7 years ago
Stephane Nicoll 2641559231 Polish contribution
Closes gh-12202
7 years ago
dreis2211 e2fb093ccf Polish
See gh-12202
7 years ago
Johnny Lim d441a8a89a Polish
Closes gh-12205
7 years ago
Andy Wilkinson 85c7ed2746 Merge branch '1.5.x' 7 years ago
Phillip Webb 4b9c3c137e Polish Collection.toArray
Consistently use `StringUtils.toStringArray`, `ClassUtils.toClassArray`
or zero length when converting collections to arrays.

Fixes gh-12160
7 years ago
Stephane Nicoll 3fddfee65c Fix default value of endpoint's cache ttl
Closes gh-12173
7 years ago
igor-suhorukov fe023817c7 Polish static finals
Closes gh-12083
7 years ago
Johnny Lim 88b184ca23 Polish 7 years ago
Andy Wilkinson e1ab62668f Merge branch '1.5.x' 7 years ago
Andy Wilkinson 5522174e96 Provide package info for all packages included in javadoc 7 years ago
Andy Wilkinson a09c64e18c Polish 7 years ago
Andy Wilkinson 70c613819d Fix incomplete calls to assertThat 7 years ago
Andy Wilkinson 76a450dfba Format with Eclipse Oxygen SR2 7 years ago
Andy Wilkinson b4f4dd3fdd Correct location of JDT config files in Gradle plugin 7 years ago
Andy Wilkinson 8b15bbf702 Polish 7 years ago
Andy Wilkinson 76ed52c2f5 Polish "Support nested jar paths in loader.path"
Closes gh-11121
7 years ago
hanyong 9eb8e3d4e3 Support nested jar paths in loader.path
See gh-11121
7 years ago
dreis2211 81459efffa Use HTTPS URLs where applicable 7 years ago
Andy Wilkinson 875091ed85 Polish “Remove or use unused method parameters”
Closes gh-11812
7 years ago
igor-suhorukov 717bd2c580 Remove or use unused method parameters 7 years ago
Phillip Webb 7d5e41f7dc Polish 7 years ago
Andy Wilkinson 1d2b85b2b8 Ensure that TestJarFile uses insertion order for jar's entries
Previously, the order of the entries in a TestJarFile was determined
by the underlying file system rather than by the order in which
they were added. This could lead to unpredicatable ordering and
failures in tests that verify archive entry ordering.

This commit updates TestJarFile to add entries to the archive in
insertion order.

See gh-11695
See gh-11696
7 years ago
Andy Wilkinson b2dad7f1c4 Rework entry ordering of repackaged archives
Previously, the Repackager would write entries in the following
order:

- Libraries that require unpacking
- Existing entries
    - Application classes
    - WEB-INF/lib jars in a war
- Libraries that do not require unpacking
- Loader classes

Libraries that require unpacking were written before existing entries
so that, when repackaging a war, an entry in WEB-INF/lib would not
get in first and prevent a library with same location from being
unpacked. However, this had the unwanted side-effect of changing
the classpath order when an entry requires unpacking.

This commit reworks the handling of existing entries and libraries
that require unpacking so that existing entries can be written first
while also marking any that match a library that requires unpacking
as requiring unpacking.

Additionally, loader classes are now written first. They are the
first classes in the jar that will be used so it seems to make sense
for them to appear first. This aligns Maven-based repackaging
with the Gradle plugin's behaviour and with the structure documented
in the reference documentation's "The Executable Jar Format" appendix.

The net result of the changes described above is that entries are
now written in the following order:

- Loader classes
- Existing entries
    - Application classes
    - WEB-INF/lib jars in a war marked for unpacking if needed
- Libraries

Closes gh-11695
Closes gh-11696
7 years ago
Johnny Lim 3cead7693d Polish
Closes gh-11871
7 years ago
Andy Wilkinson 8f116f7e6f Align ordering of BootJar and BootWar archive entries
Previously, the ordering of the entries in an archive produced by
BootJar was different to the ordering of the entries in an archive
produced by BootWar. The latter placed application classes before
any nested jars, whereas the former was the other way around.

This commit updates BootJar to use the same ordering as BootWar and
adds tests to verify that the ordering is the following:

1. Loader classes
2. Application classes (BOOT-INF/classes or WEB-INF/classes)
3. Nested jars (BOOT-INF/lib or WEB-INF/lib)
4. Provided nested jars in a war (WEB-INF/lib-provided)

The tests also verify that the position of a library is not affected
by it requiring unpacking.

See gh-11695
See gh-11696
7 years ago
Phillip Webb 7c5042d079 Don't run `apply-plugin` tests
Stop running apply-plugin tests as part of the build since during a
release the version number will change and the jar will not be
available.

Fixes gh-11857
7 years ago
Phillip Webb 6dddceacad Always include plugin classpath in sample gradle
Update a couple of the `spring-boot-gradle-plugin` sample gradle flies
so that they include the running classpath. The additional lines are
contained within a tag which is ultimately filtered from the final
documentation.

Fixes gh-11857
7 years ago
Phillip Webb 886b39293c Merge branch '1.5.x' 7 years ago
Phillip Webb 187c4d728c Merge branch '1.5.x' 7 years ago
Stephane Nicoll 51c307f643 Merge branch '1.5.x' 7 years ago
Phillip Webb af50a18da9 Polish 7 years ago
Andy Wilkinson 199088b0c9 Set kotlin.version when Kotlin's Gradle plugin is applied
Closes gh-11711
7 years ago
dreis2211 c1675c2d5f Use InvocationOnMock.getArgument() where possible
Closes gh-11818
7 years ago
dreis2211 a7663c88d3 Replace casted Mockito.any() calls
Closes gh-11817
7 years ago
Stephane Nicoll 5e26d04c05 Only generate time-to-live property for matching endpoints
This commit makes sure that a "cache.time-to-live" property is not
generated for endpoints that do not have a main read operation (i.e. a
read operation with no parameter or only nullable parameters).

This matches the endpoint feature that provides caching for only such
operation.

Closes gh-11703
7 years ago
Phillip Webb b234501af3 Polish 7 years ago
Johnny Lim a46e047c5d Polish
Closes gh-11792
7 years ago
Andy Wilkinson 498f66fcdc Test the Gradle plugin against Gradle 4.5
Closes gh-11768
7 years ago
Phillip Webb adfb6dc128 Polish 7 years ago
Stephane Nicoll 43bac617d4 Add access to short deprecation reason
Closes gh-11770
7 years ago
igor-suhorukov 093ca0a687 Use EnumMap whenever possible
Replace regular Map instances with EnumMap to reduce memory consumption.

Closes gh-11760
7 years ago
Phillip Webb ab6ad6aa4b Polish 7 years ago
Andy Wilkinson 1a1a62b744 Protect tests against Cassandra startup failures
On CI, Cassandra running inside the Docker container sometimes fails
to start or the start times out. This has nothing to do with Boot so
we  attempt to protect our tests from the flakiness of the container
by allowing 3 startup attempts.
7 years ago
andrey.onufreyko b19dcb13e2 Replace string arguments with char
Optimize method calls by replacing single character String arguments
with char.

Closes gh-11680
7 years ago
dreis2211 b7e663e820 Polish
Closes gh-11724
7 years ago
Phillip Webb f3379668ac Polish 7 years ago
Phillip Webb 6d93573db0 Merge branch '1.5.x' 7 years ago
Stephane Nicoll ba6be4f22f Merge branch '1.5.x' 7 years ago
Stephane Nicoll aa748cb0ef Polish "Use System.lineSeparator()""
Closes gh-11665
7 years ago
Johnny Lim d8c83af987 Use System.lineSeparator()
See gh-11665
7 years ago
Stephane Nicoll 49b5fe0c29 Polish
As `validation-api` 2 is available by default, this commit adds the
integration test as a regular test case. The integration test is kept to
exercise what happens in a standard project.

See gh-11512
7 years ago
Stephane Nicoll 60f5cf10ba Merge branch '1.5.x' 7 years ago
Andy Wilkinson 54c0cf513b Polish 7 years ago
Stephane Nicoll d43346d6c2 Polish "Fix potential resource leaks"
Closes gh-11624
7 years ago
igor-suhorukov 5a4238acfc Fix potential resource leaks
See gh-11624
7 years ago
Stephane Nicoll f8af6c8134 Merge branch '1.5.x' 7 years ago
Andy Wilkinson ffc99b03dd Remove use of deprecated Gradle API from plugin's public API
This commit removes the use of the incubating PropertyState and
Provider API that was introduced in Gradle 4.0 and deprecated in
Gradle 4.3. A not-deprecated-but-still-incubating replacement was
introduced in Gradle 4.3. The short life of PropertyState and Provider
has made me wary of using an incubating Gradle API in our public API
as it may not be stable for long. Therefore, this commit does not move
to the replacement as it is incubating. Instead, it falls back to
using Gradle's convention mapping. This is internal API, but its use
is not part of our public API and I perceive the risk of using it to
be lower than using the deprecated and/or incubating API alternatives.

Closes gh-11640
7 years ago
Andy Wilkinson 5e17fc775c Test the Gradle plugin against Gradle 4.4.1
Closes gh-11654
7 years ago
Andy Wilkinson 2668e41dd5 Make it easier to just use Boot’s dependency management with Gradle
Closes gh-11059
7 years ago
Johnny Lim 77150f8dc9 Polish
Closes gh-11630
7 years ago
Phillip Webb b078698f20 Update copyright year of changed files 7 years ago
Phillip Webb 85d3f5a180 Fix NPE in test containers
Fix NPE accidentally introduced during refinement.
7 years ago
Phillip Webb 201da97774 Further refine test containers 7 years ago
Andy Wilkinson 996b3ef7f2 Refine test containers 7 years ago
Phillip Webb 87bccb96f1 Merge branch '1.5.x' 7 years ago
Stephane Nicoll 66d58294d5 Merge branch '1.5.x' 7 years ago
Stephane Nicoll f2d3f51f3f Merge branch '1.5.x' 7 years ago
Stephane Nicoll ac004eabf3 Update copyright header
See gh-11510
7 years ago
Johnny Lim 37d8eedae3 Polish
Closes gh-11510
7 years ago
Madhura Bhave e28915bd4b Make integration tests self-contained
Fixes gh-10516
7 years ago
Andy Wilkinson a7808388ad Make github-tag property available when generating Gradle plugin docs
Closes gh-11490
7 years ago
Stephane Nicoll 03dd53f347 Fix broken merge 7 years ago
Stephane Nicoll e3bfd797a3 Merge branch '1.5.x' 7 years ago
Phillip Webb bee5fa7fc6 Polish 7 years ago
Andy Wilkinson 38ac595615 Polish 7 years ago
Stephane Nicoll f0b210c751 Merge branch '1.5.x' 7 years ago
Stephane Nicoll 6277d0ceb7 Update copyright header 7 years ago
dreis2211 eb1ae2dd79 Fix typos
Closes gh-11460
7 years ago
Andy Wilkinson b545330d8e Fix reusable archive creation with Gradle 4.1 and later
Closes gh-11468
7 years ago
Madhura Bhave 8102dc78cb Remove redundant throws declarations 7 years ago
Stephane Nicoll 5328508421 Merge branch '1.5.x' 7 years ago
Johnny Lim 8f7ab95e0e Use BufferedReader.lines()
Closes gh-11436
7 years ago
Johnny Lim 3c5ccb1166 Polish
Closes gh-11418
7 years ago
Johnny Lim 4cc598ac5e Replace contains() with indexOf()
Closes gh-11373
7 years ago
Phillip Webb 2efa21c570 Make hot methods in-line friendly
Refactor a few hot methods so that they are more likely to be in-lined
by the JIT.

Fixes gh-11409
7 years ago
Phillip Webb 7f0048a899 Use fast exceptions when enumerating resources
Update the `LaunchedURLClassLoader` used for fat jar support so that
each iteration on a `findResources` result also allows for fast
exceptions.

Fixes gh-11406
7 years ago
Phillip Webb aa66d5dfb8 Reduce garbage created when loading fat jars
Refactor fat jar loader classes so that less `char[]` instances are
created. This is primarily achieved by adding a new `StringSequence`
class that can chop up Strings without needing to copy the underlying
array. Since Java 8, calls to `String.subString(...)` always copy the
underlying char array. For many of the operations that we need, this
is unnecessary.

Fixes gh-11405
7 years ago
dreis2211 00d12c5b2d Align 'behavior' spelling to style guide
Closes gh-11394
7 years ago
Phillip Webb 3273859fde Polish 7 years ago
Phillip Webb 5ca608330c Merge branch '1.5.x' 7 years ago
Stephane Nicoll a626f5462d Consistent use of @AliasFor
Closes gh-10836
7 years ago
Stephane Nicoll 47c8b5731a polish 7 years ago
Stephane Nicoll b6aa0f24e2 Clean endpointIds in generated metadata
Closes gh-11107
7 years ago
Stephane Nicoll 7f2af8b209 Polish 7 years ago
Andy Wilkinson 58d1f99a1e Merge branch '1.5.x' 7 years ago
Stephane Nicoll 23218add90 Polish 7 years ago
Brian Clozel e68d8a3f98 Merge branch '1.5.x' 7 years ago
Johnny Lim 96250743b5 Add missing "abstract" keywords
Closes gh-11303
7 years ago
Johnny Lim 6d54072e04 Remove "final" keywords
Closes gh-11294
7 years ago
Stephane Nicoll 36ea2ee87b Merge branch '1.5.x' 7 years ago
Johnny Lim 2c204f2154 Polish
Closes gh-11242
7 years ago
Andy Wilkinson 6cae9257fe Merge branch '1.5.x' 7 years ago
Johnny Lim 44299bb980 Polish
Closes gh-11206
7 years ago
Stephane Nicoll 9965221378 Merge branch '1.5.x' 7 years ago
Andy Wilkinson ffca60d308 Revert "Rework BootRun so that it does not subclass JavaExec"
This reverts commit 6eee9de3c1.

Closes gh-10872
7 years ago
Andy Wilkinson aa9c5e6e08 Align expectation with new endpoint enabled property description
See gh-10870
7 years ago
Phillip Webb e82913dd5a Align appendix edits with source code
Port editing changes from append to java source files to ensure that
IDE meta-data also reflects the improvements.

Closes gh-10870
7 years ago
Andy Wilkinson 417c98304d Remove assumption about file separator that is incorrect on Windows
Closes gh-11087
7 years ago
Phillip Webb cbaf0fa686 Support Duration in generated meta-data
Update the configuration properties annotation processor to deal
with `Duration` based default values. For example a field that
defaults to `Duration.ofSeconds(10)` will have a meta-data default
value of `10s`.

See gh-11080
7 years ago
Johnny Lim 1783a072ad Remove explicit constructor super() calls
Closes gh-11068
7 years ago
Phillip Webb a6cefc5ba0 Polish 7 years ago
Johnny Lim 639bf5e99c Update "Building reference documentation" section
This commit also changes `spring-boot-maven-plugin/pom.xml` to make it
work with `full` Maven profile.

Closes gh-11045
7 years ago
Johnny Lim cbb483735d Polish
Closes gh-10948
7 years ago
dreis2211 1e4941e29a Use StandardCharsets where possible
Closes gh-11036
7 years ago
Stephane Nicoll bcab23e538 Polish "Separate endpoint concerns"
* Fix the endpoint prefix for generated metadata.
* Polish and improve configuration key descriptions.

Closes gh-10176
7 years ago
Phillip Webb fd5c43cdc9 Separate endpoint concerns
Update endpoint code to provide cleaner separation of concerns.
Specifically, the top level endpoint package is no longer aware of
the fact that JMX and HTTP are ultimately used to expose endpoints.
Caching concerns have also been abstracted behind a general purpose
`OperationMethodInvokerAdvisor` interface.

Configuration properties have been refined to further enforce
separation. The `management.endpoint.<name>` prefix provides
configuration for a  single endpoint (including enable and cache
time-to-live). These  properties are now technology agnostic (they
don't include `web` or `jmx` sub properties).

The `management.endpoints.<technology>` prefix provide exposure specific
configuration. For example, `management.endpoints.web.path-mapping`
allow endpoint URLs to be changed.

Endpoint enabled/disabled logic has been simplified so that endpoints
can't be disabled per exposure technology. Instead a filter based
approach is used to allow refinement of what endpoints are exposed over
a given technology.

Fixes gh-10176
7 years ago
Johnny Lim bd0dcfb172 Utilize StandardCharsets
Closes gh-10972
7 years ago
Stephane Nicoll 424793d806 Merge branch '1.5.x' 7 years ago
Johnny Lim c05a299520 Polish
Closes gh-10921
7 years ago
Phillip Webb b6166dc12a Move `Assume` to spring-boot-test-support
Fixes gh-10866
7 years ago
Johnny Lim 84d137d41d Restore execution permission on launch.script
Restore the execute permission that was accidentally removed in
commit 5ee28a08e1.

Closes gh-10801
7 years ago
Andy Wilkinson e43d0adc4f Polish 7 years ago
Andy Wilkinson 9bbccb093a Rename Gradle plugin tests to work around Windows filename restrictions
The Gradle plugin integration tests find their Gradle build scripts
using a naming convention of ${ClassName}-${methodName}.gradle. This
convention led to two gradle scripts with filenames that were long
enough to causes problems on Windows.

This commit renames two test methods to reduce the length of their
names and, therefore, the names of their corresponding Gradle script
files.

Closes gh-10868
7 years ago
Phillip Webb c11e514767 Allow individual builds of invoker plugin projects
Clean `${revision}` variables when running invoker based integration
tests. Prior to this commit some `${revision}` placeholders remained
in the invoker local repository preventing the project from being built
outside of the reactor.

Fixes gh-10667
7 years ago
Phillip Webb c55b5d7111 Polish 7 years ago
Andy Wilkinson 6f55b57855 Make discovery of additional config metdata more robust with Gradle
Previously, the configuration metadata annotation processor relied
upon an additional metadata file have been copied to an output
location. When building with Gradle, it's the processResources task
that performs this copy and there is no guarantee that it will have
run before the compileJava task unless an explicit dependency betwee
the two tasks has been configured. If a project is built using
Gradle's parallel build support, the likelihood of this required
ordering not occurring increases.

This commit updates the configuration metadata annotation processor to
consider a new annotation processor option when looking for the
additional config metadata file. The Gradle plugin has been updated
to provide this option as a compiler argument. The option is only
provided when the annotation processor is found on the compilation
classpath to avoid a warning from javac's annotation processing about
the use of an option that is not supported by any of the available
annotation processors.

Closes gh-9755
7 years ago
Andy Wilkinson 48cc7bde30 Test the Gradle plugin against Gradle 4.3
Closes gh-10769
7 years ago
Stephane Nicoll 4dcc354f86 Merge branch '1.5.x' 7 years ago
Stephane Nicoll a688613fb4 Merge branch '1.5.x' 7 years ago
Andy Wilkinson ca4d7f7322 Test the Gradle plugin against Gradle 4.3-rc-4
See gh-10769
7 years ago
Stephane Nicoll 56afc25304 Allow to customize the path of a web endpoint
This commit introduces a endpoints.<id>.web.path generic property that
allows to customize the path of an endpoint. By default the path is the
same as the id of the endpoint.

Such customization does not apply for the CloudFoundry specific
endpoints.

Closes gh-10181
7 years ago
Andy Wilkinson c3f3bba090 Test the Gradle plugin against Gradle 4.3-rc-3
See gh-10769
7 years ago
Andy Wilkinson 2b426c30a6 Polish “Remove explicit type arguments”
Closes gh-10494
7 years ago
Johnny Lim 6168fae720 Remove explicit type arguments
See gh-10494
7 years ago
Andy Wilkinson a256602c7b Polish 7 years ago
Andy Wilkinson ccca943e33 Add mainClassName to springBoot DSL in Gradle plugin
This commit introduces a new mainClassName property on the springBoot
DSL provided by the Gradle plugin. It can be used to explicitly
configure the mainClassName of the default bootRun, bootJar, and
bootWar tasks in a single place. Previously, the only mechanism
provided to do so was the mainClassName property that's only available
when the application plugin has been applied.

Closes gh-10623
7 years ago
Andy Wilkinson 5502aaafd1 Use mainClassName consistently across BootRun, BootJar, and BootWar
Previously, BootRun used the main property to configure the name of
the main class to run while BootJar and BootWar used the mainClass
property. Both were different to the application plugin which provides
a mainClassName project property.

This commit updates BootRun, BootJar, and BootWar to change the name
of the property used to configure the name of the main class to be
mainClassName. This makes the three Boot-specific tasks consistent
with each other, and also aligns them with Gradle's own application
plugin.

Closes gh-10622
7 years ago
Stephane Nicoll dd90f071c6 Bump ASM version to be Java 8+ compatible
Closes gh-10647
7 years ago
dreis2211 3b71393e0a Use Assert.state() with Supplier where possible
See gh-10658
7 years ago
Johnny Lim 5aa32b3d0f Polish
Closes gh-10636
7 years ago
Johnny Lim a51765d0f4 Fix broken documentation links
Update links following recent project restructure.

Closes gh-10601
7 years ago
dreis2211 a76005e8d9 Remove concatenations with empty string
Closes gh-10512
7 years ago
Phillip Webb 748e0779b6 Update copyright year for changed files 7 years ago
Phillip Webb 0be119eadd Don't deploy spring-boot-test-support
Fixes gh-10518
7 years ago
Andy Wilkinson 6323dc4e21 Reduce logging that is produced when building Gradle plugin
Travis is terminating builds as they are producing too much logging.
A major contributor to the volume of logging is the Gradle plugin's
build. This commit switches off debug logging for the build and
enables test event logging. This considerably reduces the volume of
logging that is produced while still providing some insight into the
build's tests.
7 years ago
Andy Wilkinson 41fc023a67 Remove unnecessary override of helper plugin's version 7 years ago
Phillip Webb 3476f7b8a4 Add debug logging switches to Gradle launch
Update launched Gradle options to include debug logging.

See gh-9316
7 years ago
Phillip Webb d588bf7506 Fix odd Java parsing issues
Update `LoggingMainClassTimeWarningListener` to import individual
`Layout` inner classes. This fixes an odd javac parse issue that
otherwise occurs.

See gh-9316
7 years ago
Phillip Webb c6f930b49e Fix Gradle to use flattened POM file
Update the Gradle plugin to use version information from the
flattened POM.xml files.

See gh-9316
7 years ago
Phillip Webb b87f9c11f1 Fix POMs for the updated build/release process
Fix POMs following project relocations and apply CI friendly Maven
conventions.

See gh-9316
7 years ago
Phillip Webb 0ba4830b4f Relocate projects to spring-boot-project
Move projects to better reflect the way that Spring Boot is released.

The following projects are under `spring-boot-project`:

  - `spring-boot`
  - `spring-boot-autoconfigure`
  - `spring-boot-tools`
  - `spring-boot-starters`
  - `spring-boot-actuator`
  - `spring-boot-actuator-autoconfigure`
  - `spring-boot-test`
  - `spring-boot-test-autoconfigure`
  - `spring-boot-devtools`
  - `spring-boot-cli`
  - `spring-boot-docs`

See gh-9316
7 years ago