On Tue, Nov 6, 2012 at 4:45 PM, Billy Newman <newman...@gmail.com> wrote:
> I am trying to filter my web.xml with no luck.
>
> Current structure:
> pom.xml
> --> src
> --->main
> ---->webapp
> ----->WEB-INF
> ------>web.xml
>
> I have the war plugin defined as follows:
>
>       <plugin>
>         <groupId>org.apache.maven.plugins</groupId>
>         <artifactId>maven-war-plugin</artifactId>
>         <version>2.3</version>
>         <configuration>
>           <webResources>
>             <resource>
>               <directory>${basedir}/src/main/webapp/WEB-INF</directory>
>               <filtering>true</filtering>
>               <includes>
>                 <include>*.xml</include>
>               </includes>
>             </resource>
>           </webResources>
>         </configuration>
>       </plugin>
>
> After I build I can look in the target directory and the web.xml that
> lives in the exploded dir is correctly filtered.  However the web.xml
> that gets packaged up in the war is not filtered.  So its like my
> filtered web.xml got copied into target after the war was built.  I
> imagine that I am not filtering the web.xml correctly, any ideas?

web.xml is a special file. You have to set
filteringDeploymentDescriptors to true to filter it (and no need to
mess up with <webResources> then)

http://maven.apache.org/plugins/maven-war-plugin/war-mojo.html#filteringDeploymentDescriptors

--
Thomas Broyer
/tɔ.ma.bʁwa.je/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to