Update `PrivateKeyParser` to support loading PEM formatted
elliptic-curve keys. We need to do a similar trick to the PKCS1 keys
and convert them to a `PKCS8EncodedKeySpec`.
Fixes gh-32646
Previously, the AOT source sets were not created until both the
Java and Spring Boot plugins had been applied. This could create
ordering problems when the Spring Boot plugin's native image plugin
action tried to access the AOT source sets to configure the
classpaths of the nativeCompile and nativeTest tasks. If the
plugins were applied in a particular order the AOT source sets
would not exist and a failure would occur.
This commit updates the Spring Boot AOT plugin to create the source
sets as soon as the Java plugin has been applied. This ensure that
they're in place when reacting to the native image plugin being
applied.
Closes gh-32661
This commit makes sure that application arguments can be provided when
optimizing an application at build-time. It uses the same mechanism of
the regular run goal, merging the profile property if set.
Closes gh-32579
This was regressed in 6175c4210d so that
each class on the classpath was passed in as a "root". This commit
corrects this so that only the roots are passed to the AOT test
processor.
See gh-32424
When the Spring Boot Gradle plugin builds a fat jar and the Native
Build Tools Gradle plugin is applied to the build, any configuration
files from the GraalVM reachability metadata repository that match
project dependencies are copied to a `META-INF/native-image`
directory in the fat jar.
Closes gh-32408
Previously, the AOT-generated classes were added directly to the
compile classpath of the AOT compilation task. This didn't work
perfectly in IntelliJ IDEA, leaving the generated classes in the
runtime scope and causing compilation problems where the
AOT-generated source tried to reference those classes.
This commit updates the plugin to add the AOT-generated classes as
a dependency to the AOT source set's implementation configuration.
This makes the classes available during compilation by the source
set's Java compilation task while also makeing IntelliJ IDEA aware
of their presence on the compile classpath.
Closes gh-32395
The list of class names generated by annotation processors should be
sorted before being written to `AutoConfiguration.imports` and
`ManagementContextConfiguration.imports` files to make the build more
deterministic.
See gh-31228
This commit adds the
`ManagementContextConfigurationImportsAnnotationProcessor` to
the `spring-boot-autoconfigure-processor` annotation processor
module.
Closes gh-32222
This commit adds the `AutoConfigurationImportsAnnotationProcessor` to
the `spring-boot-autoconfigure-processor` annotation processor
module. When added to a project build, the annotation processor will
generate the
`org.springframework.boot.autoconfigure.AutoConfiguration.imports`
file automatically from `@AutoConfiguration`-annotated classes. It
also applies the annotation processor to the Spring Boot build.
Closes gh-31228
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 stops AotGenerateMojo from being an extension of the
regular run infrastructure and used the opportunity to extract a
number of utility classes to run a Java process.
As a result, not all features of running an application is supported
and exposed options now are targeted against AOT.
See gh-31682
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 introduces auto-configuration for the new Elasticsearch
clients that are based upon their new Java client. The new Java
client builds on top of their existing low-level REST client,
replacing the high-level REST client which has been deprecated.
As part of introducing support for the new Elasticsearch client,
the auto-configuration for the templates (both imperative and
reactive) provided by Spring Data has also been updated to use the
new templates that build upon the new Java client.
As part of these changes, support for the high-level REST client and
the old Spring Data Elasticsearch templates has been removed. One
significant change is that the new reactive template is no longer
based on WebClient. As a result, the WebClient-specific configuration
property has been removed.
Closes gh-30647
Closes gh-28597
Closes gh-31755
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