Croway opened a new pull request, #23568:
URL: https://github.com/apache/camel/pull/23568

   ## Summary
   
   - **Camel Main**: Dockerfiles now use layered packaging — dependencies are 
copied to `target/lib/` via `maven-dependency-plugin:copy-dependencies`, and 
the thin `.original` JAR is copied separately. On code-only changes, only the 
~6 KB application layer is invalidated instead of the full 10+ MB fat JAR.
   - **Spring Boot**: Dockerfiles use a multi-stage build with Spring Boot's 
`jarmode=tools extract --layers` to split the fat JAR into 4 Docker layers 
(dependencies, spring-boot-loader, snapshot-dependencies, application). Uses 
the new `jarmode=tools` syntax (replacing the deprecated `jarmode=layertools` 
removed in Spring Boot 4.1).
   - **Quarkus**: Already uses fast-jar layered packaging. 
`--quarkus-package-type` is now deprecated and hidden — Quarkus always uses 
fast-jar.
   - Runtime-specific Dockerfile templates: 
`Dockerfile21.ftl`/`Dockerfile25.ftl` for Camel Main, 
`Dockerfile-spring-boot21.ftl`/`Dockerfile-spring-boot25.ftl` for Spring Boot. 
Selection is driven by `ExportSpringBoot.getDockerfileTemplateName()`.
   - `main-pom.ftl` adds `maven-jar-plugin` (classpath manifest) and 
`maven-dependency-plugin:copy-dependencies` to produce layered artifacts 
alongside the existing fat JAR.
   
   JIRA: https://issues.apache.org/jira/browse/CAMEL-23601
   
   Credit to Simon Hartl for originally raising the concern.
   
   ## Test plan
   
   - [x] Unit tests pass (`TemplateHelperTest` — 23 tests, `ExportTest` — 69 
tests)
   - [x] Exported Camel Main, Spring Boot, and Quarkus projects with `camel 
export`
   - [x] Built all three with `mvn package`
   - [x] Verified JARs run locally (`java -jar`)
   - [x] Verified thin JAR + `lib/` runs for Camel Main
   - [x] Built Docker images for all three runtimes
   - [x] Ran all three Docker containers successfully
   
   _Claude Code on behalf of Federico Mariani_


-- 
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]

Reply via email to