2021 Commits

Author SHA1 Message Date
Madhura Bhave
82ac7eef91 Update tests following code changes
See gh-22821
2021-01-28 14:24:18 -08:00
Madhura Bhave
9a32f67802 Fix formatting 2021-01-28 13:38:30 -08:00
Madhura Bhave
152698f2b2 Add support for creating layered war files with Maven
See gh-22821
2021-01-28 12:39:19 -08:00
Phillip Webb
c9a2c4e326 Merge branch '2.4.x' 2021-01-26 19:06:48 -08:00
Phillip Webb
d06407ec0a Update copyright year of changed files 2021-01-26 19:06:14 -08:00
Phillip Webb
b1f27b7604 Merge branch '2.4.x'
Closes gh-24995
2021-01-25 21:36:36 -08:00
Phillip Webb
522f68cb40 Merge branch '2.3.x' into 2.4.x
Closes gh-24994
2021-01-25 21:36:12 -08:00
Phillip Webb
464b302655 Set withTestKitDir per Gradle version
Attempt to fix cache locking issues by setting a unique `withTestKitDir`
directory for each tested Gradle version.

Closes gh-24993
2021-01-25 21:35:25 -08:00
Andy Wilkinson
f3fd55dac6 Merge branch '2.4.x'
Closes gh-24976
2021-01-22 14:59:35 +00:00
Andy Wilkinson
9c8645dec2 Merge branch '2.3.x' into 2.4.x
Closes gh-24975
2021-01-22 14:59:23 +00:00
Andy Wilkinson
46d908f632 Upgrade to Gradle 6.8.1
Closes gh-24737
2021-01-22 14:20:57 +00:00
Stephane Nicoll
2c2c160579 Remove deprecated code
See gh-24806
2021-01-15 14:14:33 +01:00
Phillip Webb
635c087694 Merge branch '2.4.x' 2021-01-12 17:33:16 -08:00
Phillip Webb
6c2ff56fba Fix tests to also work in IDE 2021-01-12 17:31:53 -08:00
Scott Frederick
9925c4ccd2 Merge branch '2.4.x'
Closes gh-24794
2021-01-12 17:50:55 -06:00
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
2021-01-12 17:50:28 -06:00
Phillip Webb
4cc1467aba Merge branch '2.4.x' 2021-01-12 12:04:40 -08:00
Phillip Webb
a6a7c06e55 Merge branch '2.3.x' into 2.4.x 2021-01-12 12:04:11 -08:00
Phillip Webb
9da0bd8523 Update copyright year of changed files 2021-01-12 12:02:57 -08:00
Andy Wilkinson
8281f404d1 Merge branch '2.4.x'
Closes gh-24769
2021-01-12 13:12:25 +00:00
Andy Wilkinson
c3dfb9bd29 Merge branch '2.3.x' into 2.4.x
Closes gh-24768
2021-01-12 13:12:10 +00:00
Andy Wilkinson
997505005b Handle files larger than Integer.MAX_VALUE bytes in bootJar and bootWar
Fixes gh-24618
2021-01-12 13:11:46 +00:00
Andy Wilkinson
f34eb86a21 Merge branch '2.4.x'
Closes gh-24739
2021-01-11 11:49:59 +00:00
Andy Wilkinson
5ae9fbedcd Merge branch '2.3.x' into 2.4.x
Closes gh-24738
2021-01-11 11:33:30 +00:00
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
2021-01-11 11:21:53 +00:00
Andy Wilkinson
f07e470765 Merge branch '2.4.x'
Closes gh-24736
2021-01-11 11:05:03 +00:00
Andy Wilkinson
3c3aa9e486 Merge branch '2.3.x' into 2.4.x
Closes gh-24735
2021-01-11 11:03:35 +00:00
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
2021-01-11 10:36:16 +00:00
Andy Wilkinson
45f298bc7a Merge branch '2.4.x'
Closes gh-24711
2021-01-08 17:08:52 +00:00
Andy Wilkinson
9e389c8376 Merge branch '2.3.x' into 2.4.x
Closes gh-24710
2021-01-08 17:07:45 +00:00
Andy Wilkinson
5ad4d627fd Fix classpath index so entries match those expected by the launcher
This reverts commit ad164269e9aa7d0f39362d78d946a146dac5fdee and adds
some additional tests.

Fixes gh-24192
2021-01-08 15:32:19 +00:00
Scott Frederick
c82165694d Merge branch '2.4.x'
Closes gh-24690
2021-01-07 16:00:03 -06:00
Scott Frederick
210438ee5b Merge branch '2.3.x' into 2.4.x
Closes gh-24689
2021-01-07 15:59:37 -06:00
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
2021-01-07 15:59:02 -06:00
Stephane Nicoll
ca1ad1488d Merge branch '2.4.x' 2021-01-04 16:40:23 +01:00
Stephane Nicoll
c19f7e696e Polish
See gh-24597
2021-01-04 16:39:27 +01:00
Stephane Nicoll
b070c39ac3 Merge branch '2.4.x'
Closes gh-24598
2020-12-23 09:15:25 +01:00
Stephane Nicoll
4cdfd6f13d Polish "Handle missing manifest files in JarTypeFilter"
See gh-24597
2020-12-23 09:12:58 +01:00
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
2020-12-23 09:11:24 +01:00
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
2020-12-21 15:51:52 +01:00
Valery Yatsynovich
1f63b82c5b Upgrade to Jackson 2.12.0
See gh-24415
2020-12-21 15:27:44 +01:00
Marten Deinum
5121ca5d17 Reduce the overhead of char[] creation
See gh-24204
2020-12-21 10:21:49 +01:00
Stephane Nicoll
c063c3434d Merge branch '2.4.x'
Closes gh-24581
2020-12-21 10:03:31 +01:00
Stephane Nicoll
09fa16c58c Merge branch '2.3.x' into 2.4.x 2020-12-21 09:59:33 +01:00
Stephane Nicoll
306b964ce3 Fix multi-release JAR test on JDK 16
See gh-24453
2020-12-21 09:59:01 +01:00
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
2020-12-17 22:51:19 -08:00
Phillip Webb
0730949325 Merge branch '2.3.x' into 2.4.x
Closes gh-24554
2020-12-17 20:47:13 -08:00
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
2020-12-17 20:43:41 -08:00
Scott Frederick
4e603d9239 Merge branch '2.3.x' into 2.4.x
Closes gh-24538
2020-12-16 15:59:28 -06:00
Scott Frederick
e4d124dc45 Improve error message with Maven build-image and war packaging
Fixes gh-24522
2020-12-16 15:58:53 -06:00