Packager#isCycloneDxBom only recognized CycloneDX SBOMs beneath
META-INF/sbom/. In a war, the CycloneDX Maven plugin's output is
packaged beneath WEB-INF/classes/META-INF/sbom/, so repackaging did
not add the SBOM manifest attributes.
Also check beneath Layout#getClassesLocation(), which findMainMethod
already uses to locate application classes. Continue to support the
root location used by jars.
Signed-off-by: COBI-98 <tkdgus968@naver.com>
See gh-51551
This commit improves TestImage so that an explicit image can trigger
the creation of the container, with optional additional setup. This
removes the need of creating additional container types for images that
have multiple flavors, and to please the static method that can only
create a container based on a single match.
Closes gh-51082
Deprecate the `useTestClasspath` flag in favor of a `testClasspath`
parameter on the `run` and `start` goals. It accepts `off`,
`dependencies`, or `all`, with `all` also adding the project's test
classes directory to the classpath so that a main class located in
`src/test/java` can be found and run, matching the `test-run` goal's
existing behaviour.
Closes gh-36115
This commit reverts partially what was done in gh-49397 to let docker
tests have access to additional maven repositories. Unfortunately, maven
build executions with the Spring Boot Maven Plugin do not use the BOM
for dependency management. As such, if one of the dependency requires
a dependency that has not been prepared in the local repository, it will
need to be able to download it from the relevant repository.
This is the case with spring-core that the maven plugin depends on when
Spring Framework and Spring Boot do not use the same Micrometer version:
the build prepares the version that Spring Boot uses, but the build
execution attempts to download the one that Spring Framework relies on.
Closes gh-51266
Added a new image cache option that uses the lifecycle's
`-cache-image` argument for the creator, analyzer, restorer and
exporter phases, so the build cache can be stored in an image and
shared between hosts via an image registry.
Exposed the option in the Maven (`<buildCache><image>`) and Gradle
(`buildCache { image { } }`) plugins.
Reject image caches configured for the launch cache, which the
lifecycle does not support.
See gh-50899
Signed-off-by: Tim Ysewyn <Tim.Ysewyn@me.com>
MainClassFinder.findSingleMainClass(JarFile, ...) does not close the
JarFile; the caller owns the resource. FindMainClass passed a newly
opened JarFile without closing it, unlike sibling call sites that use
try-with-resources.
See gh-50949
Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>