When using the Gradle `bootBuildImage` task or Maven
`spring-boot:build-image` goal on a Linux distribution with SELinux
enabled, binding the Docker socket in the builder container might
fail. This commit disables the `label` security policy in the builder
container to prevent this type of failure.
Fixes gh-32000
Update `JarFile` so that the `close()` method no longer closes nested
jars or the wrapper. Prior to this commit it was possible for a parent
jar file to be garbage collected and closed even though references still
existed to the nested jars. When this happened the nested jars would get
closed and any access to entries would result in `JarFile.ensureOpen()`
throwing an `IllegalStateException`. The user would often not see this
exception directly, but rather find `ClassNotFoundException` being
thrown.
Fixes gh-31853
This commit removes the requirement that `docker.publishRegistry`
configuration must be provided when an image is published by the Gradle
or Maven plugin.
Fixes gh-28844
This commit adds validation of any buildpacks that are specified for
image building to match them against buildpacks that are bundled in
the builder. If an image buildpack's ID, version, and one layer
hash match the same information stored in a label on the builder
image, that buildpack won't be added and the buildpack bundled in
the builder will be used instead. This reduces the chance of adding to
the total count of layers in a builder image unnecessarily.
Fixes gh-31233
Update `Log4J2LoggingSystemTests` to exclude Logback and include
'log4j-slf4j-impl'. The `ModifiedClassPathClassLoader` has also been
updated so that it no longer automatically excludes `log4j` artifacts,
instead we now use `@ClassPathExclusions` on the relevant tests.
Fixes gh-19365
Update `JarFile` and related classes so that `close()` is not longer
called early.
Prior to this commit, we would always immediately close the underlying
jar file to prevent file locking issues with our build. This causes
issues on certain JVMs when they attempt to verify a signed jar.
The file lock issues have now been solved by returning a custom input
stream from `JarUrlConnection` which captures and delegates the close
method.
Fixes gh-29356
Previously, ResolvedDependencies used hasError on
ResolvedConfiguration to check that it was safe to work with all
of the resolved configuration's artifacts and their files. This
check is not sufficient as errors can still occur later on.
This commit updates ResolvedDependencies to use a lenient
configuration, thereby avoiding any problems that may be caused by
errors that occur after the hasError check.
Closes gh-30586
Update `layer-*.xsd` files with following fixes:
- Rename <includeProjectDependencies> to <includeModuleDependencies>
- Rename <excludeProjectDependencies> to <excludeModuleDependencies>
See gh-31126
This commit deprecates the "fork" property so that the application
always runs in a dedicated process. This aligns with the behaviour of
the Gradle plugin, and simplifies the lifecycle of certain features that
would not work in a non-forked process.
Closes gh-30479
Previously, querying the artifact's extension in
SinglePublishedArtifact would result in eager creation of the task
that creates the artifact. Typically, this is the bootWar task.
Instead of querying the extension, this commit reworks
SinglePublishedArtifact and its callers to call separate methods for
jar and war artifacts so that the extension check is no longer
required.
Tests have been added to ensure that running help does not trigger
any unexpected task creation. The tests' assertions tolerate some
variation in behavior that depend on the version of Gradle and
whether the configuration cache is enabled.
Closes gh-30211
- Adds a new @DisableOnOs annotation, which is inspired from JUnit5s
@DisableOnOs annotation. This new annotation supports the architecture
and is repeatable
Closes gh-30082
The changes for gh-28562 attempted to align the Gradle plugin's
handling of META-INF with the Maven plugin's behavior. Unfortunately,
they want too far, applying the handling to both jar and war files
when the Maven plugin only applies it to jar files.
This commit reworks the changes so that they only apply to jar files.
Closes gh-30026
Previously, all integral numbers were parsed as integers. This
caused two problems:
1. Compilation would fail if the default value for a long wasn't a
valid integer.
2. The default value for a byte or short could be out of range,
resulting in the generation of invalid metadata and an error
that could have been caught at compile time not being caught
until runtime.
This commit updates the parsing of all numeric values to use the
parse method of the target primitive type. For example,
Short.parseShort(String) is now used to parse a short.
Fixes gh-30020