davsclaus commented on code in PR #29778:
URL: https://github.com/apache/camel/pull/29778#discussion_r4569528988
##########
tooling/camel-tooling-maven/src/main/java/org/apache/camel/tooling/maven/MavenDownloader.java:
##########
@@ -79,6 +80,24 @@ default List<MavenArtifact> resolveArtifacts(
return resolveArtifacts(rootGav, dependencyGAVs, extraRepositories,
transitively, useApacheSnapshots);
}
+ /**
+ * Resolves the artifacts as {@link #resolveArtifacts(String, List, Set,
boolean, boolean, Predicate)} does, with
+ * the versions of the managed artifacts: a transitive dependency on one
of them gets its version, as with the
+ * dependencyManagement of a Maven project. For example, the libraries
already loaded, so a library is not resolved
+ * again in another version.
Review Comment:
Fixed in a3dcd2d7f828: "For example, camel run passes the libraries it has
already loaded, so that a library is not resolved again in another version."
The `managed` parameter is named in the `@param` just below, so the sentence
says who passes it and why.
_Claude Code on behalf of Claus Ibsen (davsclaus)_
##########
docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc:
##########
@@ -8637,6 +8637,14 @@ The `withFixedPort()` container of
`camel-test-infra-artemis` maps the same port
A service that does not start because a port it maps on the host is taken now
fails with one line that names the port,
and the infra service that has it, instead of the stack trace of the container
runtime.
+=== camel-jbang - camel run loads one version of each library
+
+`camel run` downloads the JARs of each component when it is first used. A
library that is already loaded is now used,
+in the version that was loaded first, for the components that are loaded
later, as the `dependencyManagement` of a
+Maven project would. Before, a later component that depended on another
version of the library added that version as
+well, so the classpath could hold, for example, three versions of Netty, and a
class was loaded from whichever JAR
+came first. Use `--verbose` to see the JARs added for each dependency.
Review Comment:
Rewritten in a3dcd2d7f828 as two short paragraphs: what `camel run` does now
(it keeps one version of each library, and a component used later gets the
loaded version, as with the `dependencyManagement` of a Maven project), then
what happened before. I kept the comparison with `dependencyManagement`, which
the suggestion dropped, as it says in one phrase how the versions are picked.
_Claude Code on behalf of Claus Ibsen (davsclaus)_
--
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]