You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Paul Vonnahme (JIRA)" <ji...@apache.org> on 2015/05/11 21:44:00 UTC

[jira] [Created] (MENFORCER-230) Document support for transitive dependencies in enforcer plugins

Paul Vonnahme created MENFORCER-230:
---------------------------------------

             Summary: Document support for transitive dependencies in enforcer plugins
                 Key: MENFORCER-230
                 URL: https://issues.apache.org/jira/browse/MENFORCER-230
             Project: Maven Enforcer Plugin
          Issue Type: Documentation
          Components: Documentation, Rule API
    Affects Versions: 1.4, 1.3.1, 1.4.1
            Reporter: Paul Vonnahme
            Priority: Critical


In the past, enforcer plugins were able to get transitive dependencies with the following code (or similar):

{code:java}
project = (MavenProject) helper.evaluate("${project}");
Set<Artifact> artifacts = project.getArtifacts();
{code}

However, as part of the fix for MENFORCER-156, 

{code:java}
requiresDependencyCollection = ResolutionScope.TEST
{code}

was removed from the @Mojo annotation, and I believe it broke the above functionality:
https://svn.apache.org/viewvc/maven/enforcer/trunk/maven-enforcer-plugin/src/main/java/org/apache/maven/plugins/enforcer/EnforceMojo.java?r1=1493565&r2=1499852&pathrev=1499852&diff_format=h

Is this a regression in 1.3.1+, or is 'DependecyGraphBuilder' now the only way to get transitive dependencies?

I believe this has caused MENFORCER-194, as well as broken the BanDuplicateClasses rule from extra-enforcer-rules, so I consider it a regression.

Right now the only workaround I know of is to continue using the 1.2 version of the enforcer plugin.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)