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
An `imagePlatform` option for the Maven and Gradle image-building
goal/task can be used to specify the os/architecture of any
builder, run, and buildpack images that are pulled during image
building.
Closes gh-40944
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
A `trustBuilder` configuration option has been added to the Maven and
Gradle CNB integration image building goal and task. A known set of
builders published by Paketo, Heroku, and Google are trusted by default,
all other builders are untrusted by default.
Closes gh-41352