[
https://jira.codehaus.org/browse/MENFORCER-138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=306670#comment-306670
]
Jakub Senko commented on MENFORCER-138:
---------------------------------------
Hi,
I have created crude implementation of this rule.
Rule will fail the build if it detects any transitive dependencies.
I have also added an option to exclude certain artifacts from being checked.
This works the same as <exclude> and <include> here:
http://maven.apache.org/enforcer/enforcer-rules/bannedDependencies.html
I have also added an option to write a custom message to user if the rule fails.
Code is here https://github.com/jsenko/enforcer-rule, but it needs some
polishing.
I would welcome any suggestions.
> 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