You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "alexey-anufriev (via GitHub)" <gi...@apache.org> on 2023/03/13 10:37:17 UTC

[GitHub] [maven-enforcer] alexey-anufriev commented on a diff in pull request #246: [MENFORCER-470] AdvancedDependencyConvergence rule

alexey-anufriev commented on code in PR #246:
URL: https://github.com/apache/maven-enforcer/pull/246#discussion_r1133733788


##########
enforcer-rules/src/main/java/org/apache/maven/enforcer/rules/dependency/DependencyConvergence.java:
##########
@@ -50,6 +53,8 @@ public final class DependencyConvergence extends AbstractStandardEnforcerRule {
 
     private List<String> excludes;
 
+    private List<String> scopes = Arrays.asList(SCOPE_COMPILE, SCOPE_RUNTIME, SCOPE_IMPORT, SCOPE_SYSTEM);

Review Comment:
   This will be an input parameter for the rule that can be configured as it is described in the documentation.
   
   Here is an example:
   ```xml
   <dependencyConvergence>
       <scopes>
           <scope>compile</scope>
           <scope>test</scope>
       </scopes>
   </dependencyConvergence>
   ```
   
   Then in the logs you will see:
   `[DEBUG] Executing Rule 0: EnforcerRuleDesc[name=dependencyConvergence, rule=DependencyConvergence[includes=null, excludes=null, uniqueVersions=false, scopes=compile,test], level=ERROR]`



-- 
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: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org