gnodet-bot commented on code in PR #29778:
URL: https://github.com/apache/camel/pull/29778#discussion_r4569434324
##########
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:
💡 **[low] Javadoc: incomplete example sentence**
The sentence `"For example, the libraries already loaded, so a library is
not resolved again in another version."` is a dangling fragment — `"the
libraries already loaded"` has no main verb and reads as incomplete.
```suggestion
* dependencyManagement of a Maven project. Pass the already-loaded
libraries as `managed` to prevent
* resolving them again in a different version.
```
##########
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:
💡 **[low] STE: two sentences exceed 25 words, multiple passive
constructions**
Sentence 2 (31 words): *"A library that is already loaded is now used, in
the version that was loaded first…"* — passive voice (`is now used`, `was
loaded first`, `are loaded later`).
Sentence 3 (38 words): *"Before, a later component that depended on another
version…"* — also runs long.
Suggested rewrite with shorter, active sentences:
```suggestion
`camel run` now loads each library in one version only: the version resolved
first.
When a later component depends on a different version of the same library,
Camel uses the already-loaded version
instead of adding the new one to the classpath. Before this change, the
classpath could hold multiple versions
of the same library (for example, three versions of Netty), and Java loaded
classes from whichever JAR came first.
Use `--verbose` to see the JARs added for each dependency.
```
--
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]