[ https://jira.codehaus.org/browse/MENFORCER-138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=306864#comment-306864 ]
Paul Gier commented on MENFORCER-138: ------------------------------------- Thanks, this is a good start. I'd like this to be part of the standard set of enforcer rules, can you add it to the enforcer code as a standard rule? You can use the git repo of the enforcer from here: https://github.com/apache/maven-enforcer Here are a couple of suggestions for improvement: If the enforcer rule fails, it should print out all the dependencies that failed instead of just failing on the first one. This way if there are multiple failures they can all be fixed without runnning the build again. Also, I think the excludes should specify the transitive dependency to be ignored instead of specifying the direct dependency that brings in the transitive dependencies. For example, this allows you to configure that a direct dependency is allowed to have one or more specific transitive, but not allowed to bring in any other transitive deps. > Rule to ban all transitive dependencies > --------------------------------------- > > Key: MENFORCER-138 > URL: https://jira.codehaus.org/browse/MENFORCER-138 > Project: Maven 2.x Enforcer Plugin > Issue Type: New Feature > Components: Standard Rules > Reporter: Paul Gier > > In some projects it's necessary (or at least desirable) to have all > dependencies specified in pom. It would be nice to have an enforcer rule > that would ban all transitive dependencies so that the user could either add > the transitive dependency directly to the pom (if it's actually needed), or > exclude the dependency. > The rule should also have an option to ignore certain transitive > dependencies, possibly using a similar syntax to other rules. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira