Commit Graph

1460 Commits (644c03124a3a056e28df67764e6fd62e6b6cc165)

Author SHA1 Message Date
Stephane Nicoll 2c2c160579 Remove deprecated code
See gh-24806
4 years ago
Phillip Webb 635c087694 Merge branch '2.4.x' 4 years ago
Phillip Webb 6c2ff56fba Fix tests to also work in IDE 4 years ago
Scott Frederick 9925c4ccd2 Merge branch '2.4.x'
Closes gh-24794
4 years ago
Scott Frederick a9e711e503 Enforce builder and run images in the same registry
Previously, when an authenticated Docker builder registry was
configured in the Maven or Gradle plugin and the builder and run
images specified different registries, the authentication credentials
would be sent to both registries. This could cause confusion if both
registries don't recognize the same credentials. This commit enforces
that both images are in the same registry when authentication
is configured.

Fixes gh-24552
4 years ago
Phillip Webb 4cc1467aba Merge branch '2.4.x' 4 years ago
Phillip Webb a6a7c06e55 Merge branch '2.3.x' into 2.4.x 4 years ago
Phillip Webb 9da0bd8523 Update copyright year of changed files 4 years ago
Andy Wilkinson 8281f404d1 Merge branch '2.4.x'
Closes gh-24769
4 years ago
Andy Wilkinson c3dfb9bd29 Merge branch '2.3.x' into 2.4.x
Closes gh-24768
4 years ago
Andy Wilkinson 997505005b Handle files larger than Integer.MAX_VALUE bytes in bootJar and bootWar
Fixes gh-24618
4 years ago
Andy Wilkinson f34eb86a21 Merge branch '2.4.x'
Closes gh-24739
4 years ago
Andy Wilkinson 5ae9fbedcd Merge branch '2.3.x' into 2.4.x
Closes gh-24738
4 years ago
Andy Wilkinson 7625a979db Configure bootRun to use project's Java toolchain by default
Previously, unlike the application plugin's run task, our bootRun task
ignored the project's Java toolchain. This meant that the application
was run on a JVM with the same Java version as the one being used by
Gradle itself. This could result in a failure if the application
required a more modern JVM.

This commit updates the plugin to configure the bootRun task's
JavaLauncher convention to be one derived from the project's Java
toolchain. Toolchain support was introduced in Gradle 6.7 so this is
only done when using Gradle 6.7 and later.

Fixes gh-24517
4 years ago
Andy Wilkinson f07e470765 Merge branch '2.4.x'
Closes gh-24736
4 years ago
Andy Wilkinson 3c3aa9e486 Merge branch '2.3.x' into 2.4.x
Closes gh-24735
4 years ago
Andy Wilkinson 064de4e073 Check configured JavaLauncher when determining version of the JVM
Previously, bootRun assumed that the Java version of the JVM that would
run the application would be the same as the Java version of the JVM
that is running the build. This assumption does not hold true when
Gradle's toolchain support is used to configure tasks that fork a new
JVM to use a version other than that being used by Gradle itself.

This commit updates the BootRun task to query the JavaLauncher property
when determining the version of Java on which the application will be
run. Toolchain support and the JavaLauncher property are new in Gradle
6.7. To support earlier versions of Gradle, NoSuchMethodError is caught
we continue as if no JavaLauncher has been configured and use the local
JVM's Java version.

Fixes gh-24512
4 years ago
Andy Wilkinson 45f298bc7a Merge branch '2.4.x'
Closes gh-24711
4 years ago
Andy Wilkinson 9e389c8376 Merge branch '2.3.x' into 2.4.x
Closes gh-24710
4 years ago
Andy Wilkinson 5ad4d627fd Fix classpath index so entries match those expected by the launcher
This reverts commit ad164269e9 and adds
some additional tests.

Fixes gh-24192
4 years ago
Scott Frederick c82165694d Merge branch '2.4.x'
Closes gh-24690
4 years ago
Scott Frederick 210438ee5b Merge branch '2.3.x' into 2.4.x
Closes gh-24689
4 years ago
Scott Frederick a302238e21 Remove layout parameters from build-image Maven goal
This commit removes the `layout` and `layoutFactory` parameters
from the `build-image` goal in the Maven plugin while retaining
them for the `repackage` goal. The `build-image` goal currently
only supports jar archives, so allowing other layout types to be
configured for the goal could cause confusion.

Fixes gh-24105
4 years ago
Stephane Nicoll ca1ad1488d Merge branch '2.4.x' 4 years ago
Stephane Nicoll c19f7e696e Polish
See gh-24597
4 years ago
Stephane Nicoll b070c39ac3 Merge branch '2.4.x'
Closes gh-24598
4 years ago
Stephane Nicoll 4cdfd6f13d Polish "Handle missing manifest files in JarTypeFilter"
See gh-24597
4 years ago
Rob Edwards 86eecb01b3 Handle missing manifest files in JarTypeFilter
This commit makes sure that a jar file without a manifest is handled
properly (i.e. included in the repackaged archive).

See gh-24597
4 years ago
Stephane Nicoll a6c6655c82 Polish "Upgrade to Jackson 2.12.0"
Guard breaking change to PropertyNamingStrategies so that we tolerate
older Jackson versions.

See gh-24415
4 years ago
Valery Yatsynovich 1f63b82c5b Upgrade to Jackson 2.12.0
See gh-24415
4 years ago
Marten Deinum 5121ca5d17 Reduce the overhead of char[] creation
See gh-24204
4 years ago
Stephane Nicoll c063c3434d Merge branch '2.4.x'
Closes gh-24581
4 years ago
Stephane Nicoll 09fa16c58c Merge branch '2.3.x' into 2.4.x 4 years ago
Stephane Nicoll 306b964ce3 Fix multi-release JAR test on JDK 16
See gh-24453
4 years ago
Phillip Webb 82791b4eda Improve performance of Tomcat 'jar:war:file' URLs
Update jar `Handler` fallback logic to directly support Tomcat
'jar:war:file' URLs. This commit allows contents to be accessed without
the JDK needing to extracted the nested jar to the temporary folder.

Closes gh-24553
4 years ago
Phillip Webb 0730949325 Merge branch '2.3.x' into 2.4.x
Closes gh-24554
4 years ago
Phillip Webb c4e41305d5 Prevent Tomcat URL "reflective access" warnings
Update the jar `Handler` class to support a non-reflective fallback
mechanism when possible. The updated code attempts to capture a regular
jar URL before our handler is installed. It can then use that URL as
context when creating the a fallback URL. The JDK jar `Handler` will
be copied from the context URL to the fallback URL.

Without this commit, resolving new Tomcat URLs of the form
`jar:war:file:...` would result in an ugly "Illegal reflective access"
warning.

Fixes gh-18631
4 years ago
Scott Frederick 4e603d9239 Merge branch '2.3.x' into 2.4.x
Closes gh-24538
4 years ago
Scott Frederick e4d124dc45 Improve error message with Maven build-image and war packaging
Fixes gh-24522
4 years ago
Scott Frederick dfcabe1665 Merge branch '2.3.x' into 2.4.x
Fixes gh-24521 in 2.4.2
4 years ago
Scott Frederick 0e5df2296e Fail with Gradle bootBuildImage and war packaging
Prior to this commit, running the bootBuildImage Gradle task on a
project configured for war packaging would result in a jar file being
built and used in the image instead of the war file. With this commit
an error will be thrown from the plugin in this case.

Fixes gh-24521
4 years ago
Andy Wilkinson 5fdb2ae2fd Protect PluginApplicationActions against absent plugin classes
Closes gh-24526
4 years ago
Phillip Webb 4fba7d0c60 Merge branch '2.3.x' into 2.4.x 4 years ago
Phillip Webb 29300530c6 Polish 4 years ago
Phillip Webb 72d36e0c07 Update copyright year of changed files 4 years ago
Phillip Webb cd5ff6e4af Merge branch '2.3.x'
Closes gh-24404
4 years ago
Phillip Webb 11f285bde5 Merge branch '2.2.x' into 2.3.x
Closes gh-24403
4 years ago
Phillip Webb 30c27274e2 Merge branch '2.3.x'
Closes gh-24339
4 years ago
Phillip Webb 5f351a6983 Merge branch '2.2.x' into 2.3.x
Closes gh-24338
4 years ago
Phillip Webb 837fc83527 Fix checkstyle header violations
See gh-24337
4 years ago