You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org> on 2009/11/21 22:52:55 UTC

[jira] Closed: (MSHADE-53) Shade createDependencyReducedPom ignores artifacts with classifier

     [ http://jira.codehaus.org/browse/MSHADE-53?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin Bentmann closed MSHADE-53.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 1.2.2
         Assignee: Benjamin Bentmann

Fixed in [r883007|http://svn.apache.org/viewvc?view=revision&revision=883007], SNAPSHOT deployed

> Shade createDependencyReducedPom ignores artifacts with classifier
> ------------------------------------------------------------------
>
>                 Key: MSHADE-53
>                 URL: http://jira.codehaus.org/browse/MSHADE-53
>             Project: Maven 2.x Shade Plugin
>          Issue Type: Bug
>    Affects Versions: 1.2.1
>         Environment: Maven 2.0.9
> JDK 1.5.0_12
>            Reporter: Jonas Vikstrom
>            Assignee: Benjamin Bentmann
>             Fix For: 1.2.2
>
>         Attachments: ShadeMojo.java.patch
>
>
> When adding a jar to be shaded that has a classifier, it is ignored and will still be in the modified pom.
> Example as follows:
> {code:title=pom.xml|borderStyle=solid}
> ...
> <dependencies>
>         <!-- Interna beroenden -->
>         <dependency>
>             <groupId>org.company.foo</groupId>
>             <artifactId>my-ejb</artifactId>
>             <version>0.0.1</version>
>             <classifier>client</classifier>
>         </dependency>
>         <dependency>
>             <groupId>org.company.foo</groupId>
>             <artifactId>domain</artifactId>
>             <version>0.0.1</version>
>         </dependency>
>  ....
> <plugin>
>                 <groupId>org.apache.maven.plugins</groupId>
>                 <artifactId>maven-shade-plugin</artifactId>
>                 <version>1.2.1</version>
>                 <executions>
>                     <execution>
>                         <phase>package</phase>
>                         <goals>
>                             <goal>shade</goal>
>                         </goals>
>                         <configuration>
>                             <shadedArtifactAttached>false</shadedArtifactAttached>
>                             <createDependencyReducedPom>true</createDependencyReducedPom>
>                             <artifactSet>
>                                 <includes>
>                                     <include>org.company.foo:my-ejb:client</include>
>                                     <include>org.company.foo:domain</include>
>                                 </includes>
>                             </artifactSet>
>                             <excludeTransitive>true</excludeTransitive>
>                         </configuration>
>                     </execution>
>                 </executions>
>             </plugin>
> ....
> {code} 
> It will shade the two jars, but _my-ejb_ *will stil be in the modified pom*
> Since it annoys me I've fixed the issue, you can find it in the attached patch.
> Usecase: You package an ejb and ejb-client with the usual plugin. And since the dependency tree for said client inherents the one for the main jar, it is preferable to wrap it in a separate module, with for instance the domain-module and with its own sets of dependencies.
> /Jonas

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira