I'd like to have a jsp in the root of src/main/webapps filtered and the var
replaced with a property in the war's pom.

In my pom I have:

<properties>
      <foo.bar>FOO/foo.bar>
</properties>

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-war-plugin</artifactId>
    <version>2.0.2</version>
    <configuration>
        <webResources>
            <resource>
                <directory>src/main/webapp</directory>
                <includes>
                    <include>**/*.jsp</include>
                </includes>
                <filtering>true</filtering>
                <!--<targetPath> </targetPath>  tried also setting this to
src/main/webapps-->
            </resource>
        </webResources>
    </configuration>
</plugin>


I have an index.jsp with

${foo.bar} defined in it.

When I run mvn clean install, I never see this var replaced in the index.jsp
in the exploded dir in target.

Any ideas what I'm doing wrong?

I found this article online and it looks like I'm doing everything
correctly.
http://fogit.blogspot.com/2009/07/web-resources-filtering-with-maven-2.html
The difference in that article is he has his jsp's in a pages dir, and mine
are right out in the root (some are also under WEB-INF/jsp but the one I
want filtered is in the root of the webapp.)

Reply via email to