elharo commented on code in PR #1667:
URL: 
https://github.com/apache/maven-dependency-plugin/pull/1667#discussion_r3698684510


##########
src/it/projects/copy-relocation/pom.xml:
##########
@@ -52,7 +60,6 @@
                 <artifactItem>
                   <groupId>org.apache.maven.its.dependency</groupId>
                   <artifactId>ResourceArtifact-relocation</artifactId>
-                  <version>1.0</version>

Review Comment:
   we should probably keep the existing test as is and add new ones without the 
version



##########
src/main/java/org/apache/maven/plugins/dependency/fromConfiguration/ArtifactItem.java:
##########
@@ -53,6 +53,16 @@ public class ArtifactItem implements DependableCoordinate {
     @Parameter
     private String version = null;
 
+    /**
+     * Classpath scope from which to infer a missing version when the artifact 
is not found in direct dependencies or
+     * dependency management. Supported values are {@code compile}, {@code 
runtime}, and {@code test}. When omitted,
+     * all three dependency graphs are considered and must agree on the 
selected version.

Review Comment:
   what if they don't agree?



##########
src/main/java/org/apache/maven/plugins/dependency/fromConfiguration/ArtifactItem.java:
##########
@@ -53,6 +53,16 @@ public class ArtifactItem implements DependableCoordinate {
     @Parameter
     private String version = null;
 
+    /**
+     * Classpath scope from which to infer a missing version when the artifact 
is not found in direct dependencies or
+     * dependency management. Supported values are {@code compile}, {@code 
runtime}, and {@code test}. When omitted,
+     * all three dependency graphs are considered and must agree on the 
selected version.
+     *
+     * @since 3.11.1
+     */
+    @Parameter
+    private String dependencyScope;

Review Comment:
   scope is different than the other fields. They're about the artifact itself. 
This is about how the artifac t is used. This might be confusing artifacts and 
dependencies on artifacts. An artifact doesn't really have a scope. 



##########
src/main/java/org/apache/maven/plugins/dependency/fromConfiguration/AbstractFromConfigurationMojo.java:
##########
@@ -120,21 +115,21 @@ public abstract class AbstractFromConfigurationMojo 
extends AbstractDependencyMo
 
     private final ArtifactHandlerManager artifactHandlerManager;
 
-    private final RepositorySystem repositorySystem;
-
     private final ResolverUtil resolverUtil;
 
+    private final DependencyVersionResolver dependencyVersionResolver;
+
     protected AbstractFromConfigurationMojo(
             MavenSession session,
             BuildContext buildContext,
             MavenProject project,
             ArtifactHandlerManager artifactHandlerManager,
-            RepositorySystem repositorySystem,
-            ResolverUtil resolverUtil) {
+            ResolverUtil resolverUtil,

Review Comment:
   This incompatibly changes a published API



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