[
http://jira.codehaus.org/browse/MWAR-182?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=165306#action_165306
]
Bryan Loofbourrow commented on MWAR-182:
----------------------------------------
Not only do I need it, I am using it in a large, multimodule project, and it is
hard to know what would substitute for it. Not packagingExcludes. My need is to
package a small, but nonempty, subset of the jars into the war. That's hard to
do well, and impossible to do in a stable manner, using a specification that
can only tell what to exclude.
The need to package a small, but nonempty, subset of jars into a war, comes
from the longstanding "skinny war problem" (
http://docs.codehaus.org/display/MAVENUSER/Solving+the+Skinny+Wars+problem ).
In making an ear of skinny wars, one wants to package all of the jars into the
ear, with, in some cases, a short list of exceptions that must be packaged into
the war in order to work properly (generally tag libraries, in my case).
There are few decent solutions to the "skinny war problem" as things stand in
Maven. By removing this includes functionality from the war plugin, the team
would be taking away what is, in the current state of things, by far the best
one, in my opinion.
> warSourceIncludes no longer works
> ---------------------------------
>
> Key: MWAR-182
> URL: http://jira.codehaus.org/browse/MWAR-182
> Project: Maven 2.x War Plugin
> Issue Type: Bug
> Affects Versions: 2.1-alpha-2
> Environment: RHEL 3
> Reporter: Bryan Loofbourrow
> Attachments: pom.xml
>
>
> The <warSourceIncludes> element no longer seems to work, as of 2.1-alpha-2.
> It does seem to work in 2.1-alpha-1. I am attaching a pom.xml file which will
> demonstrate the problem when used as follows:
> 1) From the directory containing the pom.xml, create a web.xml, because
> otherwise it fails (setting failsOnMissingWebXml didn't seem to do the trick):
> mkdir -p src/main/webapp/WEB-INF
> touch src/main/webapp/WEB-INF/web.xml
> 2) Build with the 2.1-alpha-1 plugin
> mvn clean install -Dwar.plugin.version=2.1-alpha-1
> 3) Dump out the jar contents to verify that only commons-logging and the
> web.xml were packaged, as requested
> [warsourceexample]$ jar -tf target/example-war-0.1-SNAPSHOT.war
> META-INF/
> META-INF/MANIFEST.MF
> WEB-INF/
> WEB-INF/web.xml
> WEB-INF/lib/
> WEB-INF/lib/commons-logging-1.1.jar
> META-INF/maven/
> META-INF/maven/example/
> META-INF/maven/example/example-war/
> META-INF/maven/example/example-war/pom.xml
> META-INF/maven/example/example-war/pom.properties
> 4) Now build using the 2.1-alpha-2 plugin version:
> mvn clean install -Dwar.plugin.version=2.1-alpha-2
> 5) Dump out the jar contents and notice that warSourceIncludes was ignored
> this time:
> [warsourceexample]$ jar -tf target/example-war-0.1-SNAPSHOT.war
> META-INF/
> META-INF/MANIFEST.MF
> WEB-INF/
> WEB-INF/classes/
> WEB-INF/lib/
> WEB-INF/web.xml
> WEB-INF/lib/commons-logging-1.1.jar
> WEB-INF/lib/log4j-1.2.12.jar
> WEB-INF/lib/logkit-1.0.1.jar
> WEB-INF/lib/avalon-framework-4.1.3.jar
> WEB-INF/lib/servlet-api-2.3.jar
> META-INF/maven/
> META-INF/maven/example/
> META-INF/maven/example/example-war/
> META-INF/maven/example/example-war/pom.xml
> META-INF/maven/example/example-war/pom.properties
--
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