look at <webResources> in the maven-war-plugin configuration section

On Jan 4, 2008 1:26 PM, Dhruva Reddy <[EMAIL PROTECTED]> wrote:

> I am working with a Java web application and trying to filter resources
> for inclusion in the WAR file.  This application runs in Tomcat.
>
> There is one file in particular, context.xml, which resides in
> src/main/webapp/META-INF/context.xml.  I have the following in pom.xml:
>
> <build>
>  ...
>  <filters>
>    <filter>${user.home}/.m2/container.properties</filter>
>  </filters>
>  <resources>
>    <resource>
>      <directory>src/main/webapp</directory>
>      <filtering>true</filtering>
>    </resource>
>  </resources>
>  ...
>
> Without the above, the WAR contains META-INF/context.xml, as is necessary.
>  However, when I have filtering turned on as above, I find the following in
> the WAR:
>
> META-INF/context.xml (this copy is not filtered)
> WEB-INF/classes/META-INF/context.xml (this copy is filtered as expected,
> but of course the file is in the wrong place)
>
> I am using Maven 2.0.8.  Is it possible to filter this way, or is there
> something else I need to do for WAR files (like look at the WAR plugin)?
>
> Thanks,
> Dhruva
>

Reply via email to