doc is available at
http://maven.apache.org/guides/getting-started/index.html#How%20do%20I%20filter%20resource%20files?

so executing this command against the filtering goal called process-resources
mvn <target> -Dfilter.properties = <yourPropertyValue>  process-resources

where the parameters for filter.properties located in pom.xml setup the filter.properties
<properties>
<filter.properties>yourPropertyValue</filter.properties>
</properties>
<!--- Load in Filter properties --->
<filters>
        <filter>src/main/filters/${filter.properties}</filter>
</filters>

<!-- Execute filter with set properties -->
<resources>
       <resource>
                <filtering>true</filtering>
                <directory>src/main/resources</directory>
        </resource>
</resources>
Notice that filtering is set to true for the folder src/main/resourcesHTHMartin----- Original Message ----- From: "Tom Purcell" <[EMAIL PROTECTED]>
To: <users@maven.apache.org>
Sent: Thursday, May 29, 2008 1:43 PM
Subject: War Plugin Filtering



Hello

I am trying to filter values in an XML document that should be placed in the
WEB-INF directory of a war. The file is located in the source structure in
src/main/webapp/WEB-INF/beans.xml along with web.xml.

I've configured the war plugin as follows:
<plugin>
 <groupId>org.apache.maven.plugins</groupId>
 <artifactId>maven-war-plugin</artifactId>
 <version>2.0</version>
 <configuration>
   <filters>
     <filter>src/main/filters/wile.filter.properties</filter>
   </filters>
   <webResources>
     <webResource>
       <directory>${basedir}/src/main/webapp/WEB-INF</directory>
       <includes>
         <include>beans.xml</include>
         <include>web.xml</include>
       </includes>
       <targetPath>WEB-INF</targetPath>
       <filtering>true</filtering>
     </webResource>
   </webResources>
 </configuration>
</plugin>

What happens is that the war winds up with two copies of both web.xml and
beans.xml. At the root of the war there are copies that are properly
filtered. In the war's WEB-INF are unfiltered copies.

I was using Maven 2.0.8. I upgraded to 2.0.9 and got the same result. Any
help would be appreciated.

Thanks
Tom
--
View this message in context: http://www.nabble.com/War-Plugin-Filtering-tp17541883p17541883.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to