This commit makes sure that integration tests for the Maven Plugin have
access to the current "spring-boot-starter-parent" pom and its
hierarchy as new integration tests rely on that.
Closes gh-42000
This commit clarifies how we intend the spring-boot:repackage goal to
be used. As it operates on the source jar (or war) that must be
effectively up-to-date to produce an accurate result, the package phase
must have run.
Contrary to build-image that was designed to be used on the command-line
by forking a package lifecycle first, repackage does not do that. This
commit also clarifies that by providing a more focused error message.
Closes gh-22317
Previously, if a classifier was set and build-image was executed from
the command-line, the build will fail as the plugin was unable to find
the original jar. This is because it relies on the attached artifacts
of the project, and those are not set when package has run as part of
a forked lifecycle.
This commit makes sure that the backup file is found by convention
first, the same way it is done for the target file.
Closes gh-26721
This commit updates the Maven Plugin to tolerate projects that are using
the module path on the JVM and targeting native images with AOT.
Previously, the plugin compiled AOT sources directly to target/classes
and the presence of a module-info there is enough to trigger a
compilation on the module path.
With this change we now compile in a separate directory that contains
the generated AOT classes (typically CGLIB proxies). These are copied to
target/classes once compilation completes already.
The integration test also uses our parent, rather than relying on what
Maven provides. That's because older Maven versions provide a default
compiler plugin version that did not handle the module path correctly.
Closes gh-33383
Previously, the mavenOptional was added to every published module but it
was only used by spring-boot-maven-plugin. This commit reduces its scope
so that it only affects the Maven plugin. It also reworks the
implementation to reuse the existing optional configuration rather than
declaring a new mavenOptional configuration. Lastly, publication of
Gradle Module Metadata (GMM) has been disabled for
spring-boot-maven-plugin. This is seen as preferable to publishing the
metadata – which isn't really needed as it does not contain any useful
additional information – and having to suppress warnings about
incomplete mapping of GMM to pom metadata.
Closes gh-41263
Replace `DockerImageNames` with a enum and relocate it from the
`testcontainers` to `container` package. The enum now also
becomes a common location that we can use to apply container
configuration such as timeouts.
Closes gh-41164
Co-authored-by: Phillip Webb <phil.webb@broadcom.com>
Documentation for native executables, CDS, and checkpoint/restore are
now under a common heading in the reference documentation, along with
sections on building container images. A few sections containing
prescriptive workflows have been moved from reference to how-to guides.
This consolidates and improves the consistency of recommendations on
how to package and run applications.
Closes gh-40977