Commit Graph

170 Commits (8b95b3a5371f40d18242e01599f9385d8b6ca5a9)

Author SHA1 Message Date
Andy Wilkinson 714a187d8f Rework dep mgmt again to avoid consumers picking up strict constraints
This paves the way for publishing Gradle module metadata once the
problem caused by snapshot versions and our two-step publication
process has been addressed.

See gh-19609
5 years ago
Andy Wilkinson aefe52e4d0 Revert "Rework dep management to avoid consumers picking up strict constraints"
This reverts commit b34a311d02 as,
having disabled the publishing of Gradle's module metadata (4f75ab5),
the changes are no longer needed.

See gh-19609
5 years ago
Phillip Webb f57281340c Merge branch '2.2.x' 5 years ago
Phillip Webb 3cfbfebbb1 Merge branch '2.1.x' into 2.2.x 5 years ago
Phillip Webb 9bd49562fe Update copyright year of changed files 5 years ago
Andy Wilkinson b34a311d02 Rework dep management to avoid consumers picking up strict constraints
Previously, enforcedPlatform dependencies were using to pull in the
constraints defined in spring-boot-dependencies and
spring-boot-parent and applied them strictly so that the constrained
version had to be used. This worked as intended in Spring Boot's own
build but incorrectly enforced those same strict version requirements
on external consumers of Spring Boot's modules.

This commit reworks how Spring Boot defines its internal dependency
management so that platform dependencies are exposed to external
consumers while enforced platform dependencies are using internally.

See gh-19609
5 years ago
Andy Wilkinson ce99db1902 Port the build to Gradle
Closes gh-19609
Closes gh-19608
5 years ago
Andy Wilkinson fc3f6a930d Merge branch '2.1.x' into 2.2.x
Closes gh-18940
5 years ago
Andy Wilkinson 5765cfe010 Allow 5 seconds for child to handle SIGINT before destroying it
Previously, when RunProcess handled a SIGINT it would immediately
attempt to destroy the process that it had run. This created a race
condition between the SIGINT being handled by the child process
and RunProcess destroying the child. The exact behavior of destroy
is implementation dependent and it may result in forcible termination
of the process where shutdown hooks are not called. This is what
happens on Windows. The exit code in such a case is 1 which prevents
anything from waiting for the process to complete from detecting
that it ended as a result of a SIGINT, leaving it with no choice but
to report an error. This is what happens with mvn spring-boot:run
with a forked process on Windows and results in the build failing.

This commit updates RunProcess to allow the child process to handle
the SIGINT itself, waiting for up to five seconds for that to happen
before the process is then destroyed. Given this time, the child
process exits with 130 which RunMojo already handles correctly as
indicating that the process died due to SIGINT and the build completes
with success as a result.

Fixes gh-18936
5 years ago
Andy Wilkinson 46c30d6bb0 Merge branch '2.1.x'
Closes gh-18476
5 years ago
Andy Wilkinson 3d4157ad6d Correct SCM URLs in published poms
Previously, Maven's default behaviour was relied up which resulted
in the artifact ID being appended to each URL as it was inherited.
This behaviour can only be disabled in Maven 3.6 and later, a version
that we cannot use due to an incompatibility with the Flatten Plugin.

This commit works around Maven's default behaviour by defining
properties for the SCM URL, connection, and developer connection and
then explicitly defining the settings in each pom using these
properties. The explicit definition of the properties in each pom
prevents them being inherited from the parent, thereby disabling the
unwanted appending of the artifact ID to the URL.

Fixes gh-18328
5 years ago
Stephane Nicoll e0d6d90683 Merge branch '2.1.x'
Closes gh-18447
5 years ago
dreis2211 417bfc4c87 Fix comment position in ZipHeaderPeekInputStreamTests
See gh-18445
5 years ago
Andy Wilkinson 79b5fd9d73 Polish "Allow the user that runs the app to be specified via an env var"
See gh-16973
5 years ago
Wagner Macedo b57f35893c Allow the user that runs the app to be specified via an env var
See gh-16973
5 years ago
dreis2211 d4affd7f85 Use hasSize() assertion in favor of length checks
See gh-17874
5 years ago
Phillip Webb 8bc780762a Merge branch '2.1.x' 5 years ago
Phillip Webb fb1dd8fe93 Merge branch '2.0.x' into 2.1.x 5 years ago
Phillip Webb 913e831f4e Merge '1.5.x' into 2.0.x 5 years ago
Phillip Webb 01933f9b06 Merge previously split strings
Merge some string lines that were previously split because of the
90 chars wide formatting.
5 years ago
Phillip Webb a66c4d3096 Unify method visibility of private classes
Apply checkstyle rule to ensure that private and package private
classes do not have unnecessary public methods. Test classes have
also been unified as much as possible to use default scoped
inner-classes.

Closes gh-7316
5 years ago
Phillip Webb 605599138e Merge branch '2.1.x' 5 years ago
Phillip Webb 92bff3c328 Merge branch '2.0.x' into 2.1.x 5 years ago
Phillip Webb cfeb0239b7 Merge branch '1.5.x' into 2.0.x 5 years ago
Stephane Nicoll e560b7f6ba Remove public modifier on JUnit5 lifecycle methods
See gh-17292
5 years ago
Andy Wilkinson cffc870fd6 Fix test failures on Windows
Since the move to JUnit 5, a number of tests were failing on Windows.
The majority were failing due to open file handles preventing the
clean up of the tests' temporary directory. This commit addresses
these failures by updating the tests to close JarFiles, InputStreams,
OutputStreams etc.

A change has also been made to CachingOperationInvokerTests to make
a flakey test more robust. Due to System.currentTimeMillis() being
less precise on Windows than it is on *nix platforms, the test could
fail as it would not sleep for long enough for the TTL period to have
expired.
6 years ago
Andy Wilkinson 405b4ad441 Merge branch '2.1.x'
Closes gh-17118
6 years ago
Andy Wilkinson 2833f60344 Avoid leaving streams open when writing libraries
Fixes gh-17115
6 years ago
Andy Wilkinson b18fffaf14 Move tests to JUnit 5 wherever possible 6 years ago
Andy Wilkinson aef92b9295 Merge branch '2.1.x'
Closes gh-17079
6 years ago
Andy Wilkinson 24925c3dae Merge branch '2.0.x' into 2.1.x
Closes gh-17078
6 years ago
Andy Wilkinson c6c139d980 Merge branch '1.5.x' into 2.0.x 6 years ago
Phillip Webb d306b31ce9 Merge branch '2.1.x' 6 years ago
Phillip Webb ccfbd03482 Merge branch '2.0.x' into 2.1.x 6 years ago
Phillip Webb b442d3b906 Merge branch '1.5.x' into 2.0.x 6 years ago
Andy Wilkinson c80218064f Use sorted properties to make build info output repeatable
Closes gh-14494
6 years ago
Andy Wilkinson 36c1c051b8 Merge branch '2.1.x' 6 years ago
Andy Wilkinson e23f72c8b0 Merge branch '2.0.x' into 2.1.x 6 years ago
Andy Wilkinson 9fbd38ab3c Merge branch '1.5.x' into 2.0.x 6 years ago
Andy Wilkinson b828b398b5 Merge branch '2.1.x' 6 years ago
Andy Wilkinson a36aa67b52 Merge branch '2.0.x' into 2.1.x 6 years ago
Spring Operator 3e2b6ac8ed Update build and setup configuration to use HTTPS
See gh-16246
6 years ago
Andy Wilkinson 43c9a789ac Merge branch '2.1.x' 6 years ago
Robert Thornton cb6362df82 Use kotlin_module not kotlin-module to identify Kotlin module metadata
See gh-16004
6 years ago
Andy Wilkinson 0adea5a905 Merge branch '2.1.x' 6 years ago
Andy Wilkinson 948bafa4d8 Repackage kotlin-module metadata beneath BOOT-INF/classes
Closes gh-15890
6 years ago
Andy Wilkinson 342bced125 Merge branch '2.1.x' 6 years ago
Andy Wilkinson 2650a07dc9 Leave module-info.class in root of archive when repackaging
Closes gh-15810
6 years ago
igor-suhorukov dfb3cd51bc Simplify code by using for-each loop
See gh-15563
6 years ago
Andy Wilkinson 61d04db0d7 Minimize and centralize assumptions about build output
Closes gh-15471
6 years ago
Stephane Nicoll bf88a7e466 Be more lenient when repackage is invoked several times
This commit makes the repackager more lenient when it is invoked several
times in the same lifecycle.

Closes gh-15034
6 years ago
Madhura Bhave f0004c4ade Merge branch '2.0.x' 6 years ago
dreis2211 5c0d7f4ac0 Avoid creation of unnecessary collections
Closes gh-14916
6 years ago
Andy Wilkinson 4a222cb4e5 Polish "Log a warning when using fallback for pid and log locations"
Closes gh-14519
6 years ago
Andreas Gebhardt 3f894cbeeb Log a warning when using fallback for pid and log locations
See gh-14519
6 years ago
Phillip Webb d76bba5e6f Migrate from ExpectedException rule to AssertJ
Replace ExpectedException JUnit rules with AssertJ exception
assertions.

Closes gh-14336
6 years ago
Andy Wilkinson 1332fcb0ad Polish "Issue a warning from launch script when app will run as root"
Closes gh-10275
6 years ago
Oliver B. Fischer 94ebd33747 Issue a warning from launch script when app will run as root
See gh-10275
6 years ago
Phillip Webb 9d1b3a2b49 Merge branch '2.0.x' 6 years ago
Phillip Webb cafff43022 Update copyright header of changed files 6 years ago
Stephane Nicoll c00fc6449b Merge branch '2.0.x' 6 years ago
dreis2211 59d911d6e0 Remove @UsesUnsafeJava annotations
Closes gh-14072
6 years ago
Phillip Webb 1b91c0ceb7 Merge branch '2.0.x' 6 years ago
Phillip Webb 0ec22c8bf9 Polish copyright date on changed files 6 years ago
Phillip Webb 80da9cf5eb Merge branch '2.0.x' 6 years ago
Phillip Webb aeb885192e Polish ternary expressions 6 years ago
Phillip Webb a6c9c92f2e Merge branch '2.0.x' 6 years ago
Phillip Webb 63b609827e Fix checkstyle method order issues
Fix checkstyle issues with method ordering following the
spring-javaformat upgrade.

See gh-13932
6 years ago
Phillip Webb e6a68b39a3 Fix checkstyle javadoc issues
Fix checkstyle issues in javadoc following the spring-javaformat
upgrade.

See gh-13932
6 years ago
Phillip Webb 7fc455654a Fix checkstyle ternary issues
Fix checkstyle issues with ternary expressions following the
spring-javaformat upgrade.

See gh-13932
6 years ago
Andy Wilkinson 918191664a Merge branch '2.0.x' 6 years ago
Andy Wilkinson 9eb5c9bd18 Merge branch '1.5.x' into 2.0.x 6 years ago
Andy Wilkinson c12f8298e6 Merge branch '2.0.x' 7 years ago
Andy Wilkinson 814e90805e Merge branch '1.5.x' into 2.0.x 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 b0433d66c1 Merge branch '2.0.x' 7 years ago
dreis2211 e6a23fa3ff Remove unnecessary semicolons
Closes gh-13144
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
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
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
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
Andy Wilkinson 6d16c5ff6e Omit libraries with null destination when repackaging
Closes gh-12437
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
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
Phillip Webb 29c3be3590 Polish 7 years ago
Stephane Nicoll 306c79f0de Merge branch '1.5.x' 7 years ago
Johnny Lim d441a8a89a Polish
Closes gh-12205
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
Johnny Lim 88b184ca23 Polish 7 years ago
Andy Wilkinson e1ab62668f Merge branch '1.5.x' 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
Phillip Webb 886b39293c Merge branch '1.5.x' 7 years ago