vishnumkartha opened a new issue, #7074:
URL: https://github.com/apache/incubator-kie/issues/7074

   ### 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_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to