[ https://jira.codehaus.org/browse/MENFORCER-123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=280381#comment-280381 ]
Arnout Engelen commented on MENFORCER-123: ------------------------------------------ The problem (if there is one) is in BannedDependencies:165: AbstractVersionEnforcer.containsVersion( VersionRange.createFromVersionSpec( pattern[2] ), new DefaultArtifactVersion( artifact.getBaseVersion() ) ); AbstractVersionEnforcer.containsVersion assumes '2.0.4' is equivalent to '[2.0.4,)', so '0.9' means '[0.9,)'. I'm not sure this makes sense in this context. I suppose either we should change this or document the workaround of excluding '[0.9]' explicitly instead of '0.9' > BannedDependencies version number not taken into account > -------------------------------------------------------- > > Key: MENFORCER-123 > URL: https://jira.codehaus.org/browse/MENFORCER-123 > Project: Maven 2.x Enforcer Plugin > Issue Type: Bug > Components: Standard Rules > Affects Versions: 1.1 > Reporter: Arnout Engelen > Attachments: enforcer-explicitversion-test.patch > > > When adding a rule with a specific version number (i.e. > 'testGroupId:release:0.9'), it causes error messages for other versions of > this artifact (i.e. 'testGroupId:release:jar:1.0'). > Attached is a patch agains enforcer-rules that adds a unit test demonstrating > the problem. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira