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

   JIRA: [CAMEL-26931](https://issues.apache.org/jira/browse/CAMEL-26931), item 
1.
   
   ## The bug
   
   `camel dependency copy` resolved each dependency of the exported project on 
its own, and copied every JAR whose file name was not in `lib/` yet. Each 
dependency then picked the versions of its own dependencies. A route with 
kafka, https, aws2-s3 and mongodb gave 97 JARs, with two versions each of 
`httpclient5` (5.6.4 and 5.6.5), `httpcore5`, `httpcore5-h2` and `slf4j-api` 
(1.7.36 and 2.0.20). It is the same problem as CAMEL-26901 item 1 in `camel 
run`, which #29782 fixed.
   
   ## The fix
   
   The dependencies are resolved together, as one dependency graph (one 
`resolveArtifacts` call with all of them). When they cannot be resolved 
together, the command finds the ones that fail, prints each on stderr (exit 1, 
as before), and resolves the others together and copies them.
   
   Same route on the launcher: 93 JARs, one version of each library; the four 
older duplicates are gone. Time is the same (0.9 s warm).
   
   ## Tests
   
   - `DependencyCopyTest.resolvesTheDependenciesTogether`: one request with all 
the dependencies. It fails on main.
   - `anArtifactThatCannotBeResolvedIsAFailure` now also checks that the 
missing artifact is reported once and that the others are copied.
   - camel-jbang-core suite green. `DependencyUpdateTest` failed once and 
passed on rerun; it fails once per run on every branch.
   
   Docs: a line in `camel-jbang-projects.adoc` and in the 4.24 upgrade guide 
(the copied JARs change).
   
   _Claude Code on behalf of davsclaus_
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


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