[
https://jira.codehaus.org/browse/MWAR-311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=343793#comment-343793
]
Anthony Accioly commented on MWAR-311:
--------------------------------------
Same Issue here, reproduced in openSUSE 13.1 and Windows 7 (probably OS
independent). This
[pom.xml|http://code.7rtc.com/sfcb/src/001b12b14863f453cd1d30431c2bda3839a2d6ee/pom.xml?at=master]
works with version 2.3 but, with version 2.4 fails to replace properties
defined in my properties file:
{code:xml}
<build>
<outputDirectory>target/${project.artifactId}-${project.version}/WEB-INF/classes</outputDirectory>
<filters>
<!-- Properties defined in this file are ignored in 2.4 -->
<filter>src/main/resources/facebook-app.properties</filter>
</filters>
<plugins>
<!-- Other plugins -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.4</version>
<configuration>
<archiveClasses>true</archiveClasses>
<webXml>${project.build.directory}/generated-sources/appengine-endpoints/WEB-INF/web.xml</webXml>
<webResources>
<resource>
<directory>${basedir}/src/main/webapp/WEB-INF/</directory>
<filtering>true</filtering>
<targetPath>WEB-INF</targetPath>
<excludes>
<exclude>web.xml</exclude>
</excludes>
</resource>
<resource>
<directory>${basedir}/src/main/webapp/</directory>
<filtering>true</filtering>
<includes>
<include>index.jsp</include>
<include>include/header.jsp</include>
<include>include/fognmeta.jsp</include>
<include>include/analytics.jsp</include>
<include>include/fb_auth.jsp</include>
</includes>
</resource>
<resource>
<directory>${project.build.directory}/generated-sources/appengine-endpoints</directory>
<includes>
<include>WEB-INF/*.discovery</include>
<include>WEB-INF/*.api</include>
</includes>
</resource>
</webResources>
</configuration>
</plugin>
<!-- Other plugins -->
</build>
{code}
> Filtering of resources broken in version 2.4
> --------------------------------------------
>
> Key: MWAR-311
> URL: https://jira.codehaus.org/browse/MWAR-311
> Project: Maven WAR Plugin
> Issue Type: Bug
> Components: filtering
> Affects Versions: 2.4
> Environment: mac os x 10.9.2, Maven 3.1.1, Maven 3.2.1
> Reporter: Evan Brodie
>
> It appears that resource filtering by version 2.4 of the maven-war-plugin is
> broken. In filtered resource files in the generated WAR directory by Maven,
> only the properties specified by the Maven build itself (ie, properties
> hard-coded in pom.xml) will appear in the resources, but not those specified
> as filters inside of the <filters> tag of <build>. However, the resources
> file that appear in target/classes will indeed have full filtering applied to
> it. This behaviour was working as of version 2.3 and earlier (as in, the
> app.properties file inside both the WAR and the classes directories will have
> filtering fully applied).
> I created a Github repo with a very simple code that can easily reproduce the
> bug, which reproduction steps and further description. Please check it out
> here: https://github.com/ecbrodie/mwp-filter-bug
> Until this bug is fixed, users like I that rely on filtering to be applied to
> their classpath resources are forced to use version 2.3 or earlier.
> This bug was reproduced on Mac OS X 10.9.2 using both Maven 3.1.1 and 3.2.1.
--
This message was sent by Atlassian JIRA
(v6.1.6#6162)