[ 
https://jira.codehaus.org/browse/MASSEMBLY-675?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Frank Wilson updated MASSEMBLY-675:
-----------------------------------

    Description: 
Version 2.4 is affected by the same issue as MASSEMBLY-444 reported on version 
2.2.

The maven assembly plugin seem to be ignoring dependencies that have been 
listed in the exclude section of the pom.  This seems to be the same as 
http://jira.codehaus.org/browse/MASSEMBLY-236 which appears to have been closed 
without resolution:

Example:

When a pom declares a dependency such as log4j which has dependencies that are 
not in the maven repository, one can add them to the exclusion listing... 
however the maven-assembly-plugin does not seem to be ignoring them as it 
should when running a dir-type assembly task.

<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.15</version>
<exclusions>
<exclusion>
<artifactId>jms</artifactId>
<groupId>javax.jms</groupId>
</exclusion>
<exclusion>
<artifactId>jmxtools</artifactId>
<groupId>com.sun.jdmk</groupId>
</exclusion>
<exclusion>
<artifactId>jmxri</artifactId>
<groupId>com.sun.jmx</groupId>
</exclusion>
</exclusions>
</dependency>

I am an updated version of the test case.

Steps to reproduce are:

$ unzip massembly-675.zip
$ cd massembly-675
$ mvn clean install
$ ls target/massembly-675-1-bin
activation-1.1.jar  log4j-1.2.15.jar    mail-1.4.jar        massembly-675-1.jar

*Notice that the excluded jars are included in the assembly*

I would expect to only see the following JARs.

* log4j-1.2.15.jar
* massembly-675-1.jar

  was:
Version 2.4 is affected by the same issue as MASSEMBLY-444 reported on version 
2.2.

The maven assembly plugin seem to be ignoring dependencies that have been 
listed in the exclude section of the pom.  This seems to be the same as 
http://jira.codehaus.org/browse/MASSEMBLY-236 which appears to have been closed 
without resolution:

Example:

When a pom declares a dependency such as log4j which has dependencies that are 
not in the maven repository, one can add them to the exclusion listing... 
however the maven-assembly-plugin does not seem to be ignoring them as it 
should when running a the jar-with-dependencies task and the build fails:

<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.15</version>
<exclusions>
<exclusion>
<artifactId>jms</artifactId>
<groupId>javax.jms</groupId>
</exclusion>
<exclusion>
<artifactId>jmxtools</artifactId>
<groupId>com.sun.jdmk</groupId>
</exclusion>
<exclusion>
<artifactId>jmxri</artifactId>
<groupId>com.sun.jmx</groupId>
</exclusion>
</exclusions>
</dependency>

I am an updated version of the test case.

Steps to reproduces are.

$ unzip massembly-675.zip
$ cd massembly-675
$ mvn clean install
$ ls target/massembly-675-1-bin
activation-1.1.jar  log4j-1.2.15.jar    mail-1.4.jar        massembly-675-1.jar

*Notice that the excluded jars are included in the assembly*

I would expect to only see the following JARs.

* log4j-1.2.15.jar
* massembly-675-1.jar

    
> Maven Assembly packaging excluded dependencies
> ----------------------------------------------
>
>                 Key: MASSEMBLY-675
>                 URL: https://jira.codehaus.org/browse/MASSEMBLY-675
>             Project: Maven Assembly Plugin
>          Issue Type: Bug
>    Affects Versions: 2.4
>         Environment: Apache Maven 3.1.1
> Java version: 1.7.0_45, vendor: Oracle Corporation
> OS name: "mac os x", version: "10.8.4", arch: "x86_64", family: "mac"
>            Reporter: Frank Wilson
>            Assignee: John Casey
>
> Version 2.4 is affected by the same issue as MASSEMBLY-444 reported on 
> version 2.2.
> The maven assembly plugin seem to be ignoring dependencies that have been 
> listed in the exclude section of the pom.  This seems to be the same as 
> http://jira.codehaus.org/browse/MASSEMBLY-236 which appears to have been 
> closed without resolution:
> Example:
> When a pom declares a dependency such as log4j which has dependencies that 
> are not in the maven repository, one can add them to the exclusion listing... 
> however the maven-assembly-plugin does not seem to be ignoring them as it 
> should when running a dir-type assembly task.
> <dependency>
> <groupId>log4j</groupId>
> <artifactId>log4j</artifactId>
> <version>1.2.15</version>
> <exclusions>
> <exclusion>
> <artifactId>jms</artifactId>
> <groupId>javax.jms</groupId>
> </exclusion>
> <exclusion>
> <artifactId>jmxtools</artifactId>
> <groupId>com.sun.jdmk</groupId>
> </exclusion>
> <exclusion>
> <artifactId>jmxri</artifactId>
> <groupId>com.sun.jmx</groupId>
> </exclusion>
> </exclusions>
> </dependency>
> I am an updated version of the test case.
> Steps to reproduce are:
> $ unzip massembly-675.zip
> $ cd massembly-675
> $ mvn clean install
> $ ls target/massembly-675-1-bin
> activation-1.1.jar  log4j-1.2.15.jar    mail-1.4.jar        
> massembly-675-1.jar
> *Notice that the excluded jars are included in the assembly*
> I would expect to only see the following JARs.
> * log4j-1.2.15.jar
> * massembly-675-1.jar

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to