You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Scott Heaberlin (JIRA)" <ji...@codehaus.org> on 2009/01/07 00:09:20 UTC
[jira] Created: (MEAR-96) earSourceExcludes does not work for jar
dependency filtering like warSourceExcludes / packagingExcludes for the
maven-war-plugin
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
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
[jira] Updated: (MEAR-96) earSourceExcludes does not work for jar
dependency filtering like warSourceExcludes / packagingExcludes for the
maven-war-plugin
Posted by "Scott Heaberlin (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MEAR-96?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Scott Heaberlin updated MEAR-96:
--------------------------------
Attachment: pom.xml
POM xml pasted into original description got munged; here is the original file.
> 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
[jira] Commented: (MEAR-96) earSourceExcludes does not work for jar
dependency filtering like warSourceExcludes / packagingExcludes for the
maven-war-plugin
Posted by "Bryan Loofbourrow (JIRA)" <ji...@codehaus.org>.
[ 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
[jira] Issue Comment Edited: (MEAR-96) earSourceExcludes does not
work for jar dependency filtering like warSourceExcludes /
packagingExcludes for the maven-war-plugin
Posted by "Scott Heaberlin (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MEAR-96?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=160170#action_160170 ]
Scott Heaberlin edited comment on MEAR-96 at 1/6/09 5:10 PM:
-------------------------------------------------------------
POM xml pasted into original description got munged; attached is the original example file.
was (Author: sheaberlin):
POM xml pasted into original description got munged; here is the original file.
> 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
[jira] Closed: (MEAR-96) earSourceExcludes does not work for jar
dependency filtering like warSourceExcludes / packagingExcludes for the
maven-war-plugin
Posted by "Stephane Nicoll (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MEAR-96?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Stephane Nicoll closed MEAR-96.
-------------------------------
Assignee: Stephane Nicoll
Resolution: Not A Bug
Fix Version/s: 2.3.2
It's not a bug, it's a feature request. earSourceExcludes like the name says excludes the content of the earSourceDirectory. It's not meant to exclude anything that was packed in the ear.
A lot of people are also using the exploded form as a deployment unit so even I implemented it, we would have a different content between the exploded form and the generate ear file.
If you don't want a module to be included in the ear, exclude it (http://maven.apache.org/plugins/maven-ear-plugin/examples/excluding-a-module.html) or manage your dependencies so that it's excluded (dependency exclusion)
> 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
> Assignee: Stephane Nicoll
> Fix For: 2.3.2
>
> 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