Repository navigation
chore: camel-launcher - the CLI distribution no longer ships lombok, nor commons-logging next to jcl-over-slf4j - #30126
Conversation
…nor commons-logging next to jcl-over-slf4j lombok (2 MB) came with openapi-generator, whose pom has it in the compile scope. Its classes only refer to @lombok.Generated, which has CLASS retention, so nothing loads lombok at runtime. commons-logging (1.2 from httpclient, 1.3.5 from spring-core) has the same org.apache.commons.logging classes as jcl-over-slf4j, which the launcher declares, so the first of the two on the class path won. Now there is only jcl-over-slf4j. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Claus Ibsen <claus.ibsen@gmail.com>
|
🌟 Thank you for your contribution to the Apache Camel project! 🌟 🐫 Apache Camel Committers, please review the following items:
|
gnodet-bot
left a comment
There was a problem hiding this comment.
LGTM. The exclusions are correct and the rationale is well-documented.
lombok: Correctly excluded fromcamel-jbang-plugin-generatewhereopenapi-generatorpulls it in with compile scope. The 158@lombok.Generatedreferences all have CLASS retention — the JVM never loads lombok at runtime. The exclusion also applies when the plugin is loaded via JBang. ✅commons-loggingfromhttpclientand fromcamel-jbang-core(spring-core transitive): Both are correct targets.jcl-over-slf4jalready in the launcher provides the sameorg.apache.commons.loggingclasses and routes to SLF4J. Having both on the classpath is a clash, not a redundancy — removing the duplicates is the right fix. ✅
Pre-fix validation: POM-only change — no behavioral code path to validate dynamically. The PR body lists manual verification: camel generate rest, camel run, and the relevant test suites (12 plugin-generate tests + launcher tests) all pass.
This review was generated by an AI agent, Hermès on behalf of @gnodet.
|
🧪 CI tested the following changed modules:
🔬 Scalpel shadow comparison — Scalpel: 1 of 726 tested, 0 compile-only — current: 1 all testedMaveniverse Scalpel detected 1 affected modules (current approach: 1). Skip-tests mode would test 1 modules (2 direct + 0 downstream), skip tests for 0 (generated code, meta-modules) Modules Scalpel would test (1)
💡 Manual integration tests recommended:
All tested modules (4 modules, 1m 12s total)Total reactor time: 1m 12s
Top 20 slowest modules:
|
What
The Camel CLI distribution (
camel-launcher, about 107 MiB for 4.23.0) shipped two jars it doesn't need:lombok-1.18.38.jar(2 MB): brought in bycamel-jbang-plugin-generate→openapi-generator7.26.0, whose pom declares Lombok with no scope, so it counts as a compile dependency. All 158 Lombok references in openapi-generator's classes are@lombok.Generated, which hasCLASSretention: the JVM never loads it. The exclusion goes incamel-jbang-plugin-generate, so it also applies when the plugin is downloaded through JBang.commons-logging: 1.2 came fromhttpclient, and once that path is excluded, 1.3.5 fromspring-core7. It contains the sameorg.apache.commons.loggingclasses asjcl-over-slf4j, which the launcher declares itself, so whichever came first on the manifest Class-Path won (commons-logging, at position 322 against 325). Now onlyjcl-over-slf4jis left, and JCL always goes to SLF4J.The distribution goes from 344 to 342 jars, and the tar.gz from 110.0 to 108.2 MiB.
I also checked these, and they stay:
slf4j-ext: openapi-generator'sOnceLoggerextendsorg.slf4j.ext.LoggerWrapper, andDefaultCodegenuses it.citrus-junitregisters the Citrusjunit4engine (META-INF/citrus/engine/junit4).javapoet: the Rest DSL generator uses it.jsr305,error_prone_annotations,j2objc-annotations): together under 60 KB.Most of the size is in the bundled plugins (core about 46 MiB, then roughly
generate25,kubernetes24,test19 MiB). That's a question of which plugins ship in the box, not for this PR.Tests
With a launcher built from this branch, compared with one built from main (in a separate home):
camel generate rest --input=petstore.yaml --dtowrites the same files (apart from the timestamp in@Generated) and the same console output.camel runof a route with--depof a jar that isn't in the local repository downloads it, runs the route, and logs httpclient's DEBUG through the Camel logging, as before.camel-jbang-plugin-generatetests (12) and theCamelLauncherTest,CamelLauncherMainEmbeddedPluginsTestandLauncherStartupLoggingTestlauncher tests pass.Claude Code on behalf of Claus Ibsen (davsclaus)
🤖 Generated with Claude Code