You are viewing a plain text version of this content. The canonical link for it is here.
Posted to announce@maven.apache.org by Brett Porter <br...@apache.org> on 2006/05/14 07:28:04 UTC
[Ann] Maven WAR Plugin 2.0
The Maven team is pleased to announce the release of the Maven WAR
Plugin, version 2.0.
http://maven.apache.org/plugins/maven-war-plugin/
You can run mvn -U to get the latest version of the plugin, or specify
the version in your project's plugin configuration:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.0</version>
</plugin>
Changes:
http://jira.codehaus.org/secure/ReleaseNote.jspa?version=12160&styleName=Text&projectId=11150&Create=Create
* [MWAR-1] - war:exploded removes content of .class files
* [MWAR-3] - war:war launched from parent doesn't find module web.xml
* [MWAR-5] - warSourceExcludes not working properly
* [MWAR-6] - dependentWarExcludes and dependentWarIncludes do not
support comma-separated patterns
* [MWAR-7] - Referenced projects' artifacts naming scheme behaves
differently when ran from reactor
* [MWAR-20] - <webXML/> tag doesn't work during aggregated build.
* [MWAR-26] - Do not overwrite target unless source is modified
* [MWAR-36] - filtering doesn't work on web resources not on the root
of the webResource dir
* [MWAR-11] - Add war:exploded and war:inplace goals
* [MWAR-12] - Add resource filtering to war plugin
* [MWAR-13] - War plugin needs better handling of multiple executions
* [MWAR-19] - Make sure that there aren't two jars with the same
artifactId and version
* [MWAR-21] - Need a way to include limited set of webapp's dependencies
* [MWAR-27] - It should be possible to exclude the META-INF/maven
directory from produced WARs
* [MWAR-8] - Merge contents of dependent wars into war being built
* [MWAR-15] - Support separate generation of WAR's manifest.mf
* [MWAR-24] - [PATCH] Add ability to specify context.xml file in plugin
configuration
* [MWAR-28] - test war plugin using plugin testing harness
War plugin v2.0 filtering problems
Posted by Kris Nuttycombe <Kr...@noaa.gov>.
Well, upon initial analysis, the webResources functionality is not
behaving as I would expect. Here's my plugin config:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.0</version>
<configuration>
<filters>
<filter>src/main/filters/${targetHost}.properties</filter>
</filters>
<webResources>
<webResource>
<filtering>true</filtering>
<directory>${basedir}/src/main/webapp</directory>
<includes>
<include>**/*.xml</include>
<include>**/*.properties</include>
</includes>
</webResource>
<webResource>
<targetPath>WEB-INF</targetPath>
<directory>${basedir}/src/main/keys</directory>
<includes>
<include>.dbkey</include>
</includes>
</weResource>
</webResources>
</configuration>
</plugin>
</plugins>
In this configuration, I specify -DtargetHost=hostname to get the filter
I want to use for the package in question (this works fine for regular
resources). No filtering appears to be occurring, and all of the
resources (including the .dbkey resource) appear to be being copied to
the root of the web application instead of their appropriate places in
the directory structure or WEB-INF, respectively. I've also attempted
pulling the resources to be filtered out of the src/main/webapp
hierarchy, but
this appears to make no difference.
Any suggestions? Here's my original configuration (that works correctly):
<build>
<finalName>${artifactId}-${targetHost}-${version}</finalName>
<filters>
<filter>src/main/filters/${targetHost}.properties</filter>
</filters>
<resources>
<resource>
<targetPath>../filtered-webapp-resources</targetPath>
<filtering>true</filtering>
<directory>${basedir}/src/main/webapp</directory>
<includes>
<include>**/*.xml</include>
<include>**/*.properties</include>
</includes>
</resource>
<resource>
<targetPath>../filtered-webapp-resources</targetPath>
<filtering>false</filtering>
<directory>${basedir}/src/main/webapp</directory>
<excludes>
<exclude>**/*.xml</exclude>
<exclude>**/*.properties</exclude>
</excludes>
</resource>
<resource>
<targetPath>../filtered-webapp-resources/WEB-INF</targetPath>
<directory>${basedir}/src/main/keys</directory>
<includes>
<include>.dbkey</include>
</includes>
</resource>
</resources>
...
</build>
Thanks,
Kris
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org