Previously, the targetJavaVersion property of bootBuildImage was set
using the project's target compatibility directly. This meant that
property's value would reflect the configured target compatibility at
the time of the task's creation and any subsequent changes to the
target compatibility would be missed.
This commit updates the registration of the bootBuildImage task to set
the value of the targetJavaVersion property using a provider. This
indirection means that the project's target compatibility isn't read
until the value of the targetJavaVersion is read, allowing any changes
to the target compatibility to be picked up even if they're made after
the bootBuildImage task has been created.
Fixes gh-26297
The previous workaround worked but prevented caching of every test
task as the value of system property pointing to the custom security
properties file varied from build to build.
This commit refines the workaround to copy the file into the build
directory of the test task's project and reference it using a URL
that's relative to the task's working directory. This ensures that
the value of the system property doesn't change from build to build.
Closes gh-26252
Previously a number of file- or directory-based task inputs were
configured with specifying their path sensitivity. This meant
that the default absolute path sensitivity was used. For caches
that are cacheable this would result in a cache miss when the
inputs were identical other than being located at a different
absolute path as they are when running a CI build vs a local build.
This commit updates the configuration of additional task inputs
to use relative path sensitivity. A property name for each input has
also been configured. This makes them easier to identify in build
scans.
Closes gh-26270
This commit disables a test that does not test what it is supposed to
and improve the Metadata assertions to fail early if more than one
matching item by name and type is found in the metadata.
See gh-26271
sun.security.x509.AlgorithmId.get(String) isn't thread-safe and can
lead to null be returned for an algorithm that should be present.
This commit aims to work around this problem by avoiding the call
to AlgorithmId.get(String). It does so by configuring the
PKCS12 key protection algorithm to one that starts with
pbewithhmacsha (case insensitive). This short-circuits the logic
in PKCS12KeyStore.mapPBEAlgorithmToOID(String) and avoids the call to
AlgorithmId.get(String). Thanks again to @dreis2211 for the
suggestion.
The work around is only used when building with Java 8 as the problem
was fixed in Java 9.
Closes gh-26252
Prior to this commit, the `spring.web.resources.cache.use-last-modified`
configuration property support was lost during a merge operation right
before 2.4.2.
This is due to an invalid test that missed this unintended change. This
commit fixes both problems.
Fixes gh-26212