[ 
http://jira.codehaus.org/browse/MEAR-96?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=163742#action_163742
 ] 

Bryan Loofbourrow commented on MEAR-96:
---------------------------------------

Yep, same issue here, in version 2.3.1. Note that the earSourceExcludes value 
pasted above wouldn't exclude commons-logging, but the one in the attached 
pom.xml would. I figure that's part of what ScottH means by "munged."

I worked around the problem by specifying a bundleDir for the jar in some 
location other than the one that the container will add to its classpath. Ugly 
and wasteful, but effective.

> earSourceExcludes does not work for jar dependency filtering like 
> warSourceExcludes / packagingExcludes for the maven-war-plugin
> --------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: MEAR-96
>                 URL: http://jira.codehaus.org/browse/MEAR-96
>             Project: Maven 2.x Ear Plugin
>          Issue Type: Bug
>         Environment: Windows XP SP3
>            Reporter: Scott Heaberlin
>         Attachments: pom.xml
>
>
> The earSourceExcludes parameter of the EarMojo does not appear to have any 
> effect on jar dependencies.  Given the pom below, commons-logging.jar should 
> be excluded from the resultant .ear archive but is not.
> The junit test for the ear mojo (test-project-014) uses earSourceExcludes but 
> only with files that are in the earSourceDirectory.
> Similar functionality works for the maven-war-plugin (warSourceExcludes, 
> which was renamed to packagingExcludes) so it was a little confusing to find 
> that earSourceIncludes does not allow filtering in the same fashion.
> ------ example pom.xml
> <project xmlns="http://maven.apache.org/POM/4.0.0";
>       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
> http://maven.apache.org/maven-v4_0_0.xsd";>
>       <modelVersion>4.0.0</modelVersion>
>       <groupId>example</groupId>
>       <artifactId>example-ear</artifactId>
>       <packaging>ear</packaging>
>       <name>example-ear</name>
>       <version>0.1-SNAPSHOT</version>
>       <description>
>               sample ear project demonstrating effectiveness of
>               earSourceExcludes parameter of the maven-ear-plugin
>       </description>
>     <build>
>         <plugins>
>             <plugin>
>                 <artifactId>maven-ear-plugin</artifactId>
>                 <version>2.3.1</version>
>                 <configuration>
>                       
> <earSourceDirectory>src/main/application</earSourceDirectory>
>                     <earSourceExcludes>**/commons*</earSourceExcludes>
>                 </configuration>
>             </plugin>
>         </plugins>
>     </build>
>       <dependencies>
>               <dependency>
>                       <groupId>org.springframework</groupId>
>                       <artifactId>spring-core</artifactId>
>                       <version>1.2.7</version>
>               </dependency>
>       </dependencies>
> </project>

-- 
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

        

Reply via email to