[ https://jira.codehaus.org/browse/MNG-3832?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=288853#comment-288853 ]
Haakon Nilsen edited comment on MNG-3832 at 1/19/12 9:18 AM: ------------------------------------------------------------- Not sure what's going on, but this seems to work in Maven 3.0.3, using this: <exclusion> <groupId>*</groupId> <artifactId>*</artifactId> </exclusion> However, this produces these warnings: [WARNING] 'dependencies.dependency.exclusions.exclusion.groupId' for no.nkf:kredws-ejb:ejb-client with value '*' does not match a valid id pattern. @ line 31, column 30 [WARNING] 'dependencies.dependency.exclusions.exclusion.artifactId' for no.nkf:kredws-ejb:ejb-client with value '*' does not match a valid id pattern. @ line 32, column 33 So I probably shouldn't be doing it, but it does work. was (Author: haakon): Not sure what's going on, but this seems to work in Maven 3.0.3, using this: {{ <exclusion> <groupId>*</groupId> <artifactId>*</artifactId> </exclusion> }} However, this produces these warnings: {{[WARNING] 'dependencies.dependency.exclusions.exclusion.groupId' for no.nkf:kredws-ejb:ejb-client with value '*' does not match a valid id pattern. @ line 31, column 30 [WARNING] 'dependencies.dependency.exclusions.exclusion.artifactId' for no.nkf:kredws-ejb:ejb-client with value '*' does not match a valid id pattern. @ line 32, column 33}} So I probably shouldn't be doing it, but it does work. > Allow wildcards in dependency exclusions > ---------------------------------------- > > Key: MNG-3832 > URL: https://jira.codehaus.org/browse/MNG-3832 > Project: Maven 2 & 3 > Issue Type: New Feature > Components: Dependencies > Reporter: Paul Gier > Fix For: 3.1 > > Attachments: MNG-3832-maven-artifact.patch > > > I would like to be able to exclude all transitive dependencies from a certain > dependencies. This is especially useful when depending on an artifact with a > classifier that may not have the same dependencies as the main artifact. > Currently the only way to do this is by excluding each dependency > individually which requires significant effort and is prone to becoming out > of date. The following syntax is one possibility. > Exclude all transitive dependencies > {code} > <exclusion> > <groupId>*</groupId> > </exclusion> > {code} > Exclude transitive dependencies with the groupId "org.company" > {code} > <exclusion> > <groupId>org.company</groupId> > <artifactId>*</artifactId> > </exclusion> > {code} -- 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