Spring-boot-maven-plugin repackage overwrites original JAR in SpringBoot integration-test modules - use exec classifier to fix
envgap__apache__incubator-kie-7074
01 / FAILURE SIGNATURE
As reported upstream
No identifying execution failure has been captured.
Not a benchmark task.
- In a clean container the reported failure did not reproduce, or the known fix did not make the project run.
02 / ENVIRONMENT RECIPE
- Base commit
c0f5c16a23608de9a8b70b88c3bd9e5d39731d2f- Manifest
kogito-apps-springboot/integration-tests-data-index-service-springboot/pom.xml- Reproduce
Awaiting issue-specific recipe- Run under trace
Awaiting a meaningful runtime command
03 / ORIGINAL ISSUE TEXT
apache/incubator-kie #7074 · read the original issue
### Describe the bug When using `spring-boot-maven-plugin` to repackage a JAR in SpringBoot integration-test modules, the plugin by default **replaces the original artifact** with the fat repackaged JAR. This breaks downstream Maven builds that depend on the original (thin) JAR - for example, when another module or step tries to use the JAR as a dependency or classpath artifact. The fix is to configure the `repackage` goal with the `exec` classifier, which makes the plugin produce the fat JAR as a _secondary_ artifact (e.g., `*-exec.jar`) while keeping the original JAR as the primary Maven artifact. ### Expected behavior The `spring-boot-maven-plugin` `repackage` goal should be configured with `<classifier>exec</classifier>` so that: - The original thin JAR remains the primary Maven artifact. - The fat/executable JAR is available as a secondary artifact with the `exec` classifier (e.g., `my-app-exec.jar`). ### Actual behavior The original JAR is replaced by the repackaged fat JAR, which can break downstream builds or test classpath resolution. ### How to Reproduce? 1. Build any SpringBoot integration-test module that uses `spring-boot-maven-plugin` with the `repackage` goal (no classifier). 2. Observe that the original JAR in `target/` is replaced by the fat repackaged JAR. 3. Any downstream Maven step that attempts to use the artifact as a regular JAR dependency fails or behaves unexpectedly. ### Output of `uname -a` or `ver` Darwin Vishnus-MacBook-Pro.local 24.1.0 Darwin Kernel Version 24.1.0: Thu Oct 10 21:06:57 PDT 2024; root:xnu-11215.41.3~3/RELEASE_ARM64_T6041 arm64 ### Output of `java -version` openjdk version "21.0.2" 2024-01-16 LTS IBM Semeru Runtime Open Edition 21.0.2.0 (build 21.0.2+13-LTS) ### GraalVM version (if different from Java) _No response_ ### Kogito version or git rev (or at least Quarkus version if you are using Kogito via Quarkus platform BOM) _No response_ ### Build tool (ie. output of `mvnw --version` or `gradlew --version`) Apache Maven 3.9.16 ### Additional information _No response_
04 / LABELS
Labels from the report text only; not yet run
No supported category has been assigned.
Label rules and the text that matched
[]