You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Matt Walsh (JIRA)" <ji...@codehaus.org> on 2011/05/27 22:53:22 UTC
[jira] Created: (MRESOURCES-146) Maven resources plugin doesn't
filter all files all the time
Maven resources plugin doesn't filter all files all the time
-------------------------------------------------------------
Key: MRESOURCES-146
URL: http://jira.codehaus.org/browse/MRESOURCES-146
Project: Maven 2.x Resources Plugin
Issue Type: Bug
Components: delimiters, filtering
Affects Versions: 2.5, 2.4.3
Environment: Maven 3.0.2
CentOS 5.5
Reporter: Matt Walsh
Attachments: mvn-resources-test.zip
I have several files in src/main/webResources, but using maven-resources-plugin to do the filtering as maven-war-plugin doesn't support alternate delimiters (yet?).
Using the following alternate delimiters for filtering: <<*>>
Configured as follows:
<build>
<filters>
<filter>src/main/filters/common.properties</filter>
</filters>
<plugins>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>${resources.version}</version>
<executions>
<execution>
<id>copy-webresources</id>
<phase>generate-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<delimiters>
<delimiter><<*>></delimiter>
</delimiters>
<useDefaultDelimiters>${default.delim}</useDefaultDelimiters>
<outputDirectory>${project.build.directory}/${project.build.finalName}</outputDirectory>
<overwrite>true</overwrite>
<resources>
<resource>
<directory>src/main/webResources</directory>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
With version 2.4.3:
- set useDefaultDelimiters to true (the default) and only some files get filtered (same ones all the time). Filters both alternate and default delimiters when filters at all.
- set useDefaultDelimiters to false and all files get filtered (alternate delimiters only).
With version 2.5:
- doesn't filter alternate delimiters at all. Filters defaults when set to true.
Output from test runs with attached project:
EXAMPLE1: 2.4.3 with default delimiters enabled:
$ mvn clean package -Dresources.version=2.4.3 -Ddefault.delim=true [INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building mvn-resources-test Maven Webapp 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ mvn-resources-test ---
[INFO] Deleting /build/merges/matt/maven-resources-test/mvn-resources-test/target
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:copy-resources (copy-webresources) @ mvn-resources-test ---
[WARNING] File encoding has not been set, using platform encoding ISO-8859-1, i.e. build is platform dependent!
[WARNING] Using platform encoding (ISO-8859-1 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 7 resources
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ mvn-resources-test ---
[WARNING] Using platform encoding (ISO-8859-1 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ mvn-resources-test ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:testResources (default-testResources) @ mvn-resources-test ---
[WARNING] Using platform encoding (ISO-8859-1 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /build/merges/matt/maven-resources-test/mvn-resources-test/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ mvn-resources-test ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.7.1:test (default-test) @ mvn-resources-test ---
[INFO] No tests to run.
[INFO] Surefire report directory: /build/merges/matt/maven-resources-test/mvn-resources-test/target/surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
There are no tests to run.
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] --- maven-war-plugin:2.1.1:war (default-war) @ mvn-resources-test ---
[INFO] Packaging webapp
[INFO] Assembling webapp [mvn-resources-test] in [/build/merges/matt/maven-resources-test/mvn-resources-test/target/mvn-resources-test]
[INFO] Processing war project
[INFO] Copying webapp resources [/build/merges/matt/maven-resources-test/mvn-resources-test/src/main/webapp]
[INFO] Webapp assembled in [30 msecs]
[INFO] Building war: /build/merges/matt/maven-resources-test/mvn-resources-test/target/mvn-resources-test.war
[INFO] WEB-INF/web.xml already added, skipping
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.497s
[INFO] Finished at: Fri May 27 14:34:19 MDT 2011
[INFO] Final Memory: 11M/981M
[INFO] ------------------------------------------------------------------------
$ grep -H lsdId ./target/mvn-resources-test/default/lobby/includes/jsp/header.jsp \
./target/mvn-resources-test/default/client/includes/jsp/header.jsp \
./target/mvn-resources-test/default/game/includes/jsp/header.jsp \
./target/mvn-resources-test/default/webmasters/includes/jsp/header.jsp \
./target/mvn-resources-test/default/multiplayerlobby/includes/jsp/header.jsp \
./target/mvn-resources-test/default/members/includes/jsp/header.jsp \
./target/mvn-resources-test/default/client/WEB-INF/classes/global.properties
./target/mvn-resources-test/default/lobby/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
./target/mvn-resources-test/default/lobby/includes/jsp/header.jsp: String lsdId = "${lsdId}";
./target/mvn-resources-test/default/client/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
./target/mvn-resources-test/default/client/includes/jsp/header.jsp: String lsdId = "${lsdId}";
./target/mvn-resources-test/default/game/includes/jsp/header.jsp: String lsdId = "zero";
./target/mvn-resources-test/default/game/includes/jsp/header.jsp: String lsdId = "zero";
./target/mvn-resources-test/default/webmasters/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
./target/mvn-resources-test/default/webmasters/includes/jsp/header.jsp: String lsdId = "${lsdId}";
./target/mvn-resources-test/default/multiplayerlobby/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
./target/mvn-resources-test/default/multiplayerlobby/includes/jsp/header.jsp: String lsdId = "${lsdId}";
./target/mvn-resources-test/default/members/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
./target/mvn-resources-test/default/members/includes/jsp/header.jsp: String lsdId = "${lsdId}";
./target/mvn-resources-test/default/client/WEB-INF/classes/global.properties:lsdId=zero
./target/mvn-resources-test/default/client/WEB-INF/classes/global.properties:lsdId=zero
EXAMPLE2: 2.4.3 with default delimiters disabled:
$ mvn clean package -Dresources.version=2.4.3 -Ddefault.delim=false
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building mvn-resources-test Maven Webapp 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ mvn-resources-test ---
[INFO] Deleting /build/merges/matt/maven-resources-test/mvn-resources-test/target
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:copy-resources (copy-webresources) @ mvn-resources-test ---
[WARNING] File encoding has not been set, using platform encoding ISO-8859-1, i.e. build is platform dependent!
[WARNING] Using platform encoding (ISO-8859-1 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 7 resources
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ mvn-resources-test ---
[WARNING] Using platform encoding (ISO-8859-1 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ mvn-resources-test ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:testResources (default-testResources) @ mvn-resources-test ---
[WARNING] Using platform encoding (ISO-8859-1 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /build/merges/matt/maven-resources-test/mvn-resources-test/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ mvn-resources-test ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.7.1:test (default-test) @ mvn-resources-test ---
[INFO] No tests to run.
[INFO] Surefire report directory: /build/merges/matt/maven-resources-test/mvn-resources-test/target/surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
There are no tests to run.
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] --- maven-war-plugin:2.1.1:war (default-war) @ mvn-resources-test ---
[INFO] Packaging webapp
[INFO] Assembling webapp [mvn-resources-test] in [/build/merges/matt/maven-resources-test/mvn-resources-test/target/mvn-resources-test]
[INFO] Processing war project
[INFO] Copying webapp resources [/build/merges/matt/maven-resources-test/mvn-resources-test/src/main/webapp]
[INFO] Webapp assembled in [31 msecs]
[INFO] Building war: /build/merges/matt/maven-resources-test/mvn-resources-test/target/mvn-resources-test.war
[INFO] WEB-INF/web.xml already added, skipping
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.495s
[INFO] Finished at: Fri May 27 14:39:09 MDT 2011
[INFO] Final Memory: 10M/981M
[INFO] ------------------------------------------------------------------------
$ grep -H lsdId ./target/mvn-resources-test/default/lobby/includes/jsp/header.jsp \
./target/mvn-resources-test/default/client/includes/jsp/header.jsp \
./target/mvn-resources-test/default/game/includes/jsp/header.jsp \
./target/mvn-resources-test/default/webmasters/includes/jsp/header.jsp \
./target/mvn-resources-test/default/multiplayerlobby/includes/jsp/header.jsp \
./target/mvn-resources-test/default/members/includes/jsp/header.jsp \
./target/mvn-resources-test/default/client/WEB-INF/classes/global.properties
./target/mvn-resources-test/default/lobby/includes/jsp/header.jsp: String lsdId = "zero";
./target/mvn-resources-test/default/lobby/includes/jsp/header.jsp: String lsdId = "${lsdId}";
./target/mvn-resources-test/default/client/includes/jsp/header.jsp: String lsdId = "zero";
./target/mvn-resources-test/default/client/includes/jsp/header.jsp: String lsdId = "${lsdId}";
./target/mvn-resources-test/default/game/includes/jsp/header.jsp: String lsdId = "zero";
./target/mvn-resources-test/default/game/includes/jsp/header.jsp: String lsdId = "${lsdId}";
./target/mvn-resources-test/default/webmasters/includes/jsp/header.jsp: String lsdId = "zero";
./target/mvn-resources-test/default/webmasters/includes/jsp/header.jsp: String lsdId = "${lsdId}";
./target/mvn-resources-test/default/multiplayerlobby/includes/jsp/header.jsp: String lsdId = "zero";
./target/mvn-resources-test/default/multiplayerlobby/includes/jsp/header.jsp: String lsdId = "${lsdId}";
./target/mvn-resources-test/default/members/includes/jsp/header.jsp: String lsdId = "zero";
./target/mvn-resources-test/default/members/includes/jsp/header.jsp: String lsdId = "${lsdId}";
./target/mvn-resources-test/default/client/WEB-INF/classes/global.properties:lsdId=zero
./target/mvn-resources-test/default/client/WEB-INF/classes/global.properties:lsdId=${lsdId}
EXAMPLE3: 2.5 with default delimiters enabled:
$ mvn clean package -Dresources.version=2.5 -Ddefault.delim=true
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building mvn-resources-test Maven Webapp 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ mvn-resources-test ---
[INFO] Deleting /build/merges/matt/maven-resources-test/mvn-resources-test/target
[INFO]
[INFO] --- maven-resources-plugin:2.5:copy-resources (copy-webresources) @ mvn-resources-test ---
[debug] execute contextualize
[WARNING] File encoding has not been set, using platform encoding ISO-8859-1, i.e. build is platform dependent!
[WARNING] Using platform encoding (ISO-8859-1 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 7 resources
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ mvn-resources-test ---
[debug] execute contextualize
[WARNING] Using platform encoding (ISO-8859-1 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ mvn-resources-test ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ mvn-resources-test ---
[debug] execute contextualize
[WARNING] Using platform encoding (ISO-8859-1 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /build/merges/matt/maven-resources-test/mvn-resources-test/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ mvn-resources-test ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.7.1:test (default-test) @ mvn-resources-test ---
[INFO] No tests to run.
[INFO] Surefire report directory: /build/merges/matt/maven-resources-test/mvn-resources-test/target/surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
There are no tests to run.
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] --- maven-war-plugin:2.1.1:war (default-war) @ mvn-resources-test ---
[INFO] Packaging webapp
[INFO] Assembling webapp [mvn-resources-test] in [/build/merges/matt/maven-resources-test/mvn-resources-test/target/mvn-resources-test]
[INFO] Processing war project
[INFO] Copying webapp resources [/build/merges/matt/maven-resources-test/mvn-resources-test/src/main/webapp]
[INFO] Webapp assembled in [30 msecs]
[INFO] Building war: /build/merges/matt/maven-resources-test/mvn-resources-test/target/mvn-resources-test.war
[INFO] WEB-INF/web.xml already added, skipping
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.510s
[INFO] Finished at: Fri May 27 14:40:31 MDT 2011
[INFO] Final Memory: 11M/981M
[INFO] ------------------------------------------------------------------------
$ grep -H lsdId ./target/mvn-resources-test/default/lobby/includes/jsp/header.jsp \
./target/mvn-resources-test/default/client/includes/jsp/header.jsp \
./target/mvn-resources-test/default/game/includes/jsp/header.jsp \
./target/mvn-resources-test/default/webmasters/includes/jsp/header.jsp \
./target/mvn-resources-test/default/multiplayerlobby/includes/jsp/header.jsp \
./target/mvn-resources-test/default/members/includes/jsp/header.jsp \
./target/mvn-resources-test/default/client/WEB-INF/classes/global.properties
./target/mvn-resources-test/default/lobby/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
./target/mvn-resources-test/default/lobby/includes/jsp/header.jsp: String lsdId = "zero";
./target/mvn-resources-test/default/client/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
./target/mvn-resources-test/default/client/includes/jsp/header.jsp: String lsdId = "zero";
./target/mvn-resources-test/default/game/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
./target/mvn-resources-test/default/game/includes/jsp/header.jsp: String lsdId = "zero";
./target/mvn-resources-test/default/webmasters/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
./target/mvn-resources-test/default/webmasters/includes/jsp/header.jsp: String lsdId = "zero";
./target/mvn-resources-test/default/multiplayerlobby/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
./target/mvn-resources-test/default/multiplayerlobby/includes/jsp/header.jsp: String lsdId = "zero";
./target/mvn-resources-test/default/members/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
./target/mvn-resources-test/default/members/includes/jsp/header.jsp: String lsdId = "zero";
./target/mvn-resources-test/default/client/WEB-INF/classes/global.properties:lsdId=<<lsdId>>
./target/mvn-resources-test/default/client/WEB-INF/classes/global.properties:lsdId=zero
EXAMPLE4: 2.5 with default delimiters disabled:
$ mvn clean package -Dresources.version=2.5 -Ddefault.delim=false [INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building mvn-resources-test Maven Webapp 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ mvn-resources-test ---
[INFO] Deleting /build/merges/matt/maven-resources-test/mvn-resources-test/target
[INFO]
[INFO] --- maven-resources-plugin:2.5:copy-resources (copy-webresources) @ mvn-resources-test ---
[debug] execute contextualize
[WARNING] File encoding has not been set, using platform encoding ISO-8859-1, i.e. build is platform dependent!
[WARNING] Using platform encoding (ISO-8859-1 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 7 resources
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ mvn-resources-test ---
[debug] execute contextualize
[WARNING] Using platform encoding (ISO-8859-1 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ mvn-resources-test ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ mvn-resources-test ---
[debug] execute contextualize
[WARNING] Using platform encoding (ISO-8859-1 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /build/merges/matt/maven-resources-test/mvn-resources-test/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ mvn-resources-test ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.7.1:test (default-test) @ mvn-resources-test ---
[INFO] No tests to run.
[INFO] Surefire report directory: /build/merges/matt/maven-resources-test/mvn-resources-test/target/surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
There are no tests to run.
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] --- maven-war-plugin:2.1.1:war (default-war) @ mvn-resources-test ---
[INFO] Packaging webapp
[INFO] Assembling webapp [mvn-resources-test] in [/build/merges/matt/maven-resources-test/mvn-resources-test/target/mvn-resources-test]
[INFO] Processing war project
[INFO] Copying webapp resources [/build/merges/matt/maven-resources-test/mvn-resources-test/src/main/webapp]
[INFO] Webapp assembled in [29 msecs]
[INFO] Building war: /build/merges/matt/maven-resources-test/mvn-resources-test/target/mvn-resources-test.war
[INFO] WEB-INF/web.xml already added, skipping
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.508s
[INFO] Finished at: Fri May 27 14:41:40 MDT 2011
[INFO] Final Memory: 11M/981M
[INFO] ------------------------------------------------------------------------
$ grep -H lsdId ./target/mvn-resources-test/default/lobby/includes/jsp/header.jsp \
./target/mvn-resources-test/default/client/includes/jsp/header.jsp \
./target/mvn-resources-test/default/game/includes/jsp/header.jsp \
./target/mvn-resources-test/default/webmasters/includes/jsp/header.jsp \
./target/mvn-resources-test/default/multiplayerlobby/includes/jsp/header.jsp \
./target/mvn-resources-test/default/members/includes/jsp/header.jsp \
./target/mvn-resources-test/default/client/WEB-INF/classes/global.properties
./target/mvn-resources-test/default/lobby/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
./target/mvn-resources-test/default/lobby/includes/jsp/header.jsp: String lsdId = "${lsdId}";
./target/mvn-resources-test/default/client/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
./target/mvn-resources-test/default/client/includes/jsp/header.jsp: String lsdId = "${lsdId}";
./target/mvn-resources-test/default/game/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
./target/mvn-resources-test/default/game/includes/jsp/header.jsp: String lsdId = "${lsdId}";
./target/mvn-resources-test/default/webmasters/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
./target/mvn-resources-test/default/webmasters/includes/jsp/header.jsp: String lsdId = "${lsdId}";
./target/mvn-resources-test/default/multiplayerlobby/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
./target/mvn-resources-test/default/multiplayerlobby/includes/jsp/header.jsp: String lsdId = "${lsdId}";
./target/mvn-resources-test/default/members/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
./target/mvn-resources-test/default/members/includes/jsp/header.jsp: String lsdId = "${lsdId}";
./target/mvn-resources-test/default/client/WEB-INF/classes/global.properties:lsdId=<<lsdId>>
./target/mvn-resources-test/default/client/WEB-INF/classes/global.properties:lsdId=${lsdId}
My test project is attached.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (MRESOURCES-146) Maven resources plugin doesn't
filter all files all the time
Posted by "Matt Walsh (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MRESOURCES-146?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Matt Walsh updated MRESOURCES-146:
----------------------------------
Attachment: mvn-resources-test.zip
> Maven resources plugin doesn't filter all files all the time
> -------------------------------------------------------------
>
> Key: MRESOURCES-146
> URL: http://jira.codehaus.org/browse/MRESOURCES-146
> Project: Maven 2.x Resources Plugin
> Issue Type: Bug
> Components: delimiters, filtering
> Affects Versions: 2.4.3, 2.5
> Environment: Maven 3.0.2
> CentOS 5.5
> Reporter: Matt Walsh
> Attachments: mvn-resources-test.zip
>
>
> I have several files in src/main/webResources, but using maven-resources-plugin to do the filtering as maven-war-plugin doesn't support alternate delimiters (yet?).
> Using the following alternate delimiters for filtering: <<*>>
> Configured as follows:
> <build>
> <filters>
> <filter>src/main/filters/common.properties</filter>
> </filters>
> <plugins>
> <plugin>
> <artifactId>maven-resources-plugin</artifactId>
> <version>${resources.version}</version>
> <executions>
> <execution>
> <id>copy-webresources</id>
> <phase>generate-resources</phase>
> <goals>
> <goal>copy-resources</goal>
> </goals>
> <configuration>
> <delimiters>
> <delimiter><<*>></delimiter>
> </delimiters>
> <useDefaultDelimiters>${default.delim}</useDefaultDelimiters>
> <outputDirectory>${project.build.directory}/${project.build.finalName}</outputDirectory>
> <overwrite>true</overwrite>
> <resources>
> <resource>
> <directory>src/main/webResources</directory>
> <filtering>true</filtering>
> </resource>
> </resources>
> </configuration>
> </execution>
> </executions>
> </plugin>
> </plugins>
> </build>
> With version 2.4.3:
> - set useDefaultDelimiters to true (the default) and only some files get filtered (same ones all the time). Filters both alternate and default delimiters when filters at all.
> - set useDefaultDelimiters to false and all files get filtered (alternate delimiters only).
> With version 2.5:
> - doesn't filter alternate delimiters at all. Filters defaults when set to true.
> Output from test runs with attached project:
> EXAMPLE1: 2.4.3 with default delimiters enabled:
> $ mvn clean package -Dresources.version=2.4.3 -Ddefault.delim=true [INFO] Scanning for projects...
> [INFO]
> [INFO] ------------------------------------------------------------------------
> [INFO] Building mvn-resources-test Maven Webapp 1.0-SNAPSHOT
> [INFO] ------------------------------------------------------------------------
> [INFO]
> [INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ mvn-resources-test ---
> [INFO] Deleting /build/merges/matt/maven-resources-test/mvn-resources-test/target
> [INFO]
> [INFO] --- maven-resources-plugin:2.4.3:copy-resources (copy-webresources) @ mvn-resources-test ---
> [WARNING] File encoding has not been set, using platform encoding ISO-8859-1, i.e. build is platform dependent!
> [WARNING] Using platform encoding (ISO-8859-1 actually) to copy filtered resources, i.e. build is platform dependent!
> [INFO] Copying 7 resources
> [INFO]
> [INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ mvn-resources-test ---
> [WARNING] Using platform encoding (ISO-8859-1 actually) to copy filtered resources, i.e. build is platform dependent!
> [INFO] Copying 0 resource
> [INFO]
> [INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ mvn-resources-test ---
> [INFO] No sources to compile
> [INFO]
> [INFO] --- maven-resources-plugin:2.4.3:testResources (default-testResources) @ mvn-resources-test ---
> [WARNING] Using platform encoding (ISO-8859-1 actually) to copy filtered resources, i.e. build is platform dependent!
> [INFO] skip non existing resourceDirectory /build/merges/matt/maven-resources-test/mvn-resources-test/src/test/resources
> [INFO]
> [INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ mvn-resources-test ---
> [INFO] No sources to compile
> [INFO]
> [INFO] --- maven-surefire-plugin:2.7.1:test (default-test) @ mvn-resources-test ---
> [INFO] No tests to run.
> [INFO] Surefire report directory: /build/merges/matt/maven-resources-test/mvn-resources-test/target/surefire-reports
> -------------------------------------------------------
> T E S T S
> -------------------------------------------------------
> There are no tests to run.
> Results :
> Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
> [INFO]
> [INFO] --- maven-war-plugin:2.1.1:war (default-war) @ mvn-resources-test ---
> [INFO] Packaging webapp
> [INFO] Assembling webapp [mvn-resources-test] in [/build/merges/matt/maven-resources-test/mvn-resources-test/target/mvn-resources-test]
> [INFO] Processing war project
> [INFO] Copying webapp resources [/build/merges/matt/maven-resources-test/mvn-resources-test/src/main/webapp]
> [INFO] Webapp assembled in [30 msecs]
> [INFO] Building war: /build/merges/matt/maven-resources-test/mvn-resources-test/target/mvn-resources-test.war
> [INFO] WEB-INF/web.xml already added, skipping
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 2.497s
> [INFO] Finished at: Fri May 27 14:34:19 MDT 2011
> [INFO] Final Memory: 11M/981M
> [INFO] ------------------------------------------------------------------------
> $ grep -H lsdId ./target/mvn-resources-test/default/lobby/includes/jsp/header.jsp \
> ./target/mvn-resources-test/default/client/includes/jsp/header.jsp \
> ./target/mvn-resources-test/default/game/includes/jsp/header.jsp \
> ./target/mvn-resources-test/default/webmasters/includes/jsp/header.jsp \
> ./target/mvn-resources-test/default/multiplayerlobby/includes/jsp/header.jsp \
> ./target/mvn-resources-test/default/members/includes/jsp/header.jsp \
> ./target/mvn-resources-test/default/client/WEB-INF/classes/global.properties
> ./target/mvn-resources-test/default/lobby/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
> ./target/mvn-resources-test/default/lobby/includes/jsp/header.jsp: String lsdId = "${lsdId}";
> ./target/mvn-resources-test/default/client/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
> ./target/mvn-resources-test/default/client/includes/jsp/header.jsp: String lsdId = "${lsdId}";
> ./target/mvn-resources-test/default/game/includes/jsp/header.jsp: String lsdId = "zero";
> ./target/mvn-resources-test/default/game/includes/jsp/header.jsp: String lsdId = "zero";
> ./target/mvn-resources-test/default/webmasters/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
> ./target/mvn-resources-test/default/webmasters/includes/jsp/header.jsp: String lsdId = "${lsdId}";
> ./target/mvn-resources-test/default/multiplayerlobby/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
> ./target/mvn-resources-test/default/multiplayerlobby/includes/jsp/header.jsp: String lsdId = "${lsdId}";
> ./target/mvn-resources-test/default/members/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
> ./target/mvn-resources-test/default/members/includes/jsp/header.jsp: String lsdId = "${lsdId}";
> ./target/mvn-resources-test/default/client/WEB-INF/classes/global.properties:lsdId=zero
> ./target/mvn-resources-test/default/client/WEB-INF/classes/global.properties:lsdId=zero
> EXAMPLE2: 2.4.3 with default delimiters disabled:
> $ mvn clean package -Dresources.version=2.4.3 -Ddefault.delim=false
> [INFO] Scanning for projects...
> [INFO]
> [INFO] ------------------------------------------------------------------------
> [INFO] Building mvn-resources-test Maven Webapp 1.0-SNAPSHOT
> [INFO] ------------------------------------------------------------------------
> [INFO]
> [INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ mvn-resources-test ---
> [INFO] Deleting /build/merges/matt/maven-resources-test/mvn-resources-test/target
> [INFO]
> [INFO] --- maven-resources-plugin:2.4.3:copy-resources (copy-webresources) @ mvn-resources-test ---
> [WARNING] File encoding has not been set, using platform encoding ISO-8859-1, i.e. build is platform dependent!
> [WARNING] Using platform encoding (ISO-8859-1 actually) to copy filtered resources, i.e. build is platform dependent!
> [INFO] Copying 7 resources
> [INFO]
> [INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ mvn-resources-test ---
> [WARNING] Using platform encoding (ISO-8859-1 actually) to copy filtered resources, i.e. build is platform dependent!
> [INFO] Copying 0 resource
> [INFO]
> [INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ mvn-resources-test ---
> [INFO] No sources to compile
> [INFO]
> [INFO] --- maven-resources-plugin:2.4.3:testResources (default-testResources) @ mvn-resources-test ---
> [WARNING] Using platform encoding (ISO-8859-1 actually) to copy filtered resources, i.e. build is platform dependent!
> [INFO] skip non existing resourceDirectory /build/merges/matt/maven-resources-test/mvn-resources-test/src/test/resources
> [INFO]
> [INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ mvn-resources-test ---
> [INFO] No sources to compile
> [INFO]
> [INFO] --- maven-surefire-plugin:2.7.1:test (default-test) @ mvn-resources-test ---
> [INFO] No tests to run.
> [INFO] Surefire report directory: /build/merges/matt/maven-resources-test/mvn-resources-test/target/surefire-reports
> -------------------------------------------------------
> T E S T S
> -------------------------------------------------------
> There are no tests to run.
> Results :
> Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
> [INFO]
> [INFO] --- maven-war-plugin:2.1.1:war (default-war) @ mvn-resources-test ---
> [INFO] Packaging webapp
> [INFO] Assembling webapp [mvn-resources-test] in [/build/merges/matt/maven-resources-test/mvn-resources-test/target/mvn-resources-test]
> [INFO] Processing war project
> [INFO] Copying webapp resources [/build/merges/matt/maven-resources-test/mvn-resources-test/src/main/webapp]
> [INFO] Webapp assembled in [31 msecs]
> [INFO] Building war: /build/merges/matt/maven-resources-test/mvn-resources-test/target/mvn-resources-test.war
> [INFO] WEB-INF/web.xml already added, skipping
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 2.495s
> [INFO] Finished at: Fri May 27 14:39:09 MDT 2011
> [INFO] Final Memory: 10M/981M
> [INFO] ------------------------------------------------------------------------
> $ grep -H lsdId ./target/mvn-resources-test/default/lobby/includes/jsp/header.jsp \
> ./target/mvn-resources-test/default/client/includes/jsp/header.jsp \
> ./target/mvn-resources-test/default/game/includes/jsp/header.jsp \
> ./target/mvn-resources-test/default/webmasters/includes/jsp/header.jsp \
> ./target/mvn-resources-test/default/multiplayerlobby/includes/jsp/header.jsp \
> ./target/mvn-resources-test/default/members/includes/jsp/header.jsp \
> ./target/mvn-resources-test/default/client/WEB-INF/classes/global.properties
> ./target/mvn-resources-test/default/lobby/includes/jsp/header.jsp: String lsdId = "zero";
> ./target/mvn-resources-test/default/lobby/includes/jsp/header.jsp: String lsdId = "${lsdId}";
> ./target/mvn-resources-test/default/client/includes/jsp/header.jsp: String lsdId = "zero";
> ./target/mvn-resources-test/default/client/includes/jsp/header.jsp: String lsdId = "${lsdId}";
> ./target/mvn-resources-test/default/game/includes/jsp/header.jsp: String lsdId = "zero";
> ./target/mvn-resources-test/default/game/includes/jsp/header.jsp: String lsdId = "${lsdId}";
> ./target/mvn-resources-test/default/webmasters/includes/jsp/header.jsp: String lsdId = "zero";
> ./target/mvn-resources-test/default/webmasters/includes/jsp/header.jsp: String lsdId = "${lsdId}";
> ./target/mvn-resources-test/default/multiplayerlobby/includes/jsp/header.jsp: String lsdId = "zero";
> ./target/mvn-resources-test/default/multiplayerlobby/includes/jsp/header.jsp: String lsdId = "${lsdId}";
> ./target/mvn-resources-test/default/members/includes/jsp/header.jsp: String lsdId = "zero";
> ./target/mvn-resources-test/default/members/includes/jsp/header.jsp: String lsdId = "${lsdId}";
> ./target/mvn-resources-test/default/client/WEB-INF/classes/global.properties:lsdId=zero
> ./target/mvn-resources-test/default/client/WEB-INF/classes/global.properties:lsdId=${lsdId}
> EXAMPLE3: 2.5 with default delimiters enabled:
> $ mvn clean package -Dresources.version=2.5 -Ddefault.delim=true
> [INFO] Scanning for projects...
> [INFO]
> [INFO] ------------------------------------------------------------------------
> [INFO] Building mvn-resources-test Maven Webapp 1.0-SNAPSHOT
> [INFO] ------------------------------------------------------------------------
> [INFO]
> [INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ mvn-resources-test ---
> [INFO] Deleting /build/merges/matt/maven-resources-test/mvn-resources-test/target
> [INFO]
> [INFO] --- maven-resources-plugin:2.5:copy-resources (copy-webresources) @ mvn-resources-test ---
> [debug] execute contextualize
> [WARNING] File encoding has not been set, using platform encoding ISO-8859-1, i.e. build is platform dependent!
> [WARNING] Using platform encoding (ISO-8859-1 actually) to copy filtered resources, i.e. build is platform dependent!
> [INFO] Copying 7 resources
> [INFO]
> [INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ mvn-resources-test ---
> [debug] execute contextualize
> [WARNING] Using platform encoding (ISO-8859-1 actually) to copy filtered resources, i.e. build is platform dependent!
> [INFO] Copying 0 resource
> [INFO]
> [INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ mvn-resources-test ---
> [INFO] No sources to compile
> [INFO]
> [INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ mvn-resources-test ---
> [debug] execute contextualize
> [WARNING] Using platform encoding (ISO-8859-1 actually) to copy filtered resources, i.e. build is platform dependent!
> [INFO] skip non existing resourceDirectory /build/merges/matt/maven-resources-test/mvn-resources-test/src/test/resources
> [INFO]
> [INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ mvn-resources-test ---
> [INFO] No sources to compile
> [INFO]
> [INFO] --- maven-surefire-plugin:2.7.1:test (default-test) @ mvn-resources-test ---
> [INFO] No tests to run.
> [INFO] Surefire report directory: /build/merges/matt/maven-resources-test/mvn-resources-test/target/surefire-reports
> -------------------------------------------------------
> T E S T S
> -------------------------------------------------------
> There are no tests to run.
> Results :
> Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
> [INFO]
> [INFO] --- maven-war-plugin:2.1.1:war (default-war) @ mvn-resources-test ---
> [INFO] Packaging webapp
> [INFO] Assembling webapp [mvn-resources-test] in [/build/merges/matt/maven-resources-test/mvn-resources-test/target/mvn-resources-test]
> [INFO] Processing war project
> [INFO] Copying webapp resources [/build/merges/matt/maven-resources-test/mvn-resources-test/src/main/webapp]
> [INFO] Webapp assembled in [30 msecs]
> [INFO] Building war: /build/merges/matt/maven-resources-test/mvn-resources-test/target/mvn-resources-test.war
> [INFO] WEB-INF/web.xml already added, skipping
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 2.510s
> [INFO] Finished at: Fri May 27 14:40:31 MDT 2011
> [INFO] Final Memory: 11M/981M
> [INFO] ------------------------------------------------------------------------
> $ grep -H lsdId ./target/mvn-resources-test/default/lobby/includes/jsp/header.jsp \
> ./target/mvn-resources-test/default/client/includes/jsp/header.jsp \
> ./target/mvn-resources-test/default/game/includes/jsp/header.jsp \
> ./target/mvn-resources-test/default/webmasters/includes/jsp/header.jsp \
> ./target/mvn-resources-test/default/multiplayerlobby/includes/jsp/header.jsp \
> ./target/mvn-resources-test/default/members/includes/jsp/header.jsp \
> ./target/mvn-resources-test/default/client/WEB-INF/classes/global.properties
> ./target/mvn-resources-test/default/lobby/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
> ./target/mvn-resources-test/default/lobby/includes/jsp/header.jsp: String lsdId = "zero";
> ./target/mvn-resources-test/default/client/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
> ./target/mvn-resources-test/default/client/includes/jsp/header.jsp: String lsdId = "zero";
> ./target/mvn-resources-test/default/game/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
> ./target/mvn-resources-test/default/game/includes/jsp/header.jsp: String lsdId = "zero";
> ./target/mvn-resources-test/default/webmasters/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
> ./target/mvn-resources-test/default/webmasters/includes/jsp/header.jsp: String lsdId = "zero";
> ./target/mvn-resources-test/default/multiplayerlobby/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
> ./target/mvn-resources-test/default/multiplayerlobby/includes/jsp/header.jsp: String lsdId = "zero";
> ./target/mvn-resources-test/default/members/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
> ./target/mvn-resources-test/default/members/includes/jsp/header.jsp: String lsdId = "zero";
> ./target/mvn-resources-test/default/client/WEB-INF/classes/global.properties:lsdId=<<lsdId>>
> ./target/mvn-resources-test/default/client/WEB-INF/classes/global.properties:lsdId=zero
> EXAMPLE4: 2.5 with default delimiters disabled:
> $ mvn clean package -Dresources.version=2.5 -Ddefault.delim=false [INFO] Scanning for projects...
> [INFO]
> [INFO] ------------------------------------------------------------------------
> [INFO] Building mvn-resources-test Maven Webapp 1.0-SNAPSHOT
> [INFO] ------------------------------------------------------------------------
> [INFO]
> [INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ mvn-resources-test ---
> [INFO] Deleting /build/merges/matt/maven-resources-test/mvn-resources-test/target
> [INFO]
> [INFO] --- maven-resources-plugin:2.5:copy-resources (copy-webresources) @ mvn-resources-test ---
> [debug] execute contextualize
> [WARNING] File encoding has not been set, using platform encoding ISO-8859-1, i.e. build is platform dependent!
> [WARNING] Using platform encoding (ISO-8859-1 actually) to copy filtered resources, i.e. build is platform dependent!
> [INFO] Copying 7 resources
> [INFO]
> [INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ mvn-resources-test ---
> [debug] execute contextualize
> [WARNING] Using platform encoding (ISO-8859-1 actually) to copy filtered resources, i.e. build is platform dependent!
> [INFO] Copying 0 resource
> [INFO]
> [INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ mvn-resources-test ---
> [INFO] No sources to compile
> [INFO]
> [INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ mvn-resources-test ---
> [debug] execute contextualize
> [WARNING] Using platform encoding (ISO-8859-1 actually) to copy filtered resources, i.e. build is platform dependent!
> [INFO] skip non existing resourceDirectory /build/merges/matt/maven-resources-test/mvn-resources-test/src/test/resources
> [INFO]
> [INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ mvn-resources-test ---
> [INFO] No sources to compile
> [INFO]
> [INFO] --- maven-surefire-plugin:2.7.1:test (default-test) @ mvn-resources-test ---
> [INFO] No tests to run.
> [INFO] Surefire report directory: /build/merges/matt/maven-resources-test/mvn-resources-test/target/surefire-reports
> -------------------------------------------------------
> T E S T S
> -------------------------------------------------------
> There are no tests to run.
> Results :
> Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
> [INFO]
> [INFO] --- maven-war-plugin:2.1.1:war (default-war) @ mvn-resources-test ---
> [INFO] Packaging webapp
> [INFO] Assembling webapp [mvn-resources-test] in [/build/merges/matt/maven-resources-test/mvn-resources-test/target/mvn-resources-test]
> [INFO] Processing war project
> [INFO] Copying webapp resources [/build/merges/matt/maven-resources-test/mvn-resources-test/src/main/webapp]
> [INFO] Webapp assembled in [29 msecs]
> [INFO] Building war: /build/merges/matt/maven-resources-test/mvn-resources-test/target/mvn-resources-test.war
> [INFO] WEB-INF/web.xml already added, skipping
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 2.508s
> [INFO] Finished at: Fri May 27 14:41:40 MDT 2011
> [INFO] Final Memory: 11M/981M
> [INFO] ------------------------------------------------------------------------
> $ grep -H lsdId ./target/mvn-resources-test/default/lobby/includes/jsp/header.jsp \
> ./target/mvn-resources-test/default/client/includes/jsp/header.jsp \
> ./target/mvn-resources-test/default/game/includes/jsp/header.jsp \
> ./target/mvn-resources-test/default/webmasters/includes/jsp/header.jsp \
> ./target/mvn-resources-test/default/multiplayerlobby/includes/jsp/header.jsp \
> ./target/mvn-resources-test/default/members/includes/jsp/header.jsp \
> ./target/mvn-resources-test/default/client/WEB-INF/classes/global.properties
> ./target/mvn-resources-test/default/lobby/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
> ./target/mvn-resources-test/default/lobby/includes/jsp/header.jsp: String lsdId = "${lsdId}";
> ./target/mvn-resources-test/default/client/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
> ./target/mvn-resources-test/default/client/includes/jsp/header.jsp: String lsdId = "${lsdId}";
> ./target/mvn-resources-test/default/game/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
> ./target/mvn-resources-test/default/game/includes/jsp/header.jsp: String lsdId = "${lsdId}";
> ./target/mvn-resources-test/default/webmasters/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
> ./target/mvn-resources-test/default/webmasters/includes/jsp/header.jsp: String lsdId = "${lsdId}";
> ./target/mvn-resources-test/default/multiplayerlobby/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
> ./target/mvn-resources-test/default/multiplayerlobby/includes/jsp/header.jsp: String lsdId = "${lsdId}";
> ./target/mvn-resources-test/default/members/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
> ./target/mvn-resources-test/default/members/includes/jsp/header.jsp: String lsdId = "${lsdId}";
> ./target/mvn-resources-test/default/client/WEB-INF/classes/global.properties:lsdId=<<lsdId>>
> ./target/mvn-resources-test/default/client/WEB-INF/classes/global.properties:lsdId=${lsdId}
> My test project is attached.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] (MRESOURCES-146) Maven resources plugin doesn't filter all
files all the time
Posted by "Dennis Lundberg (JIRA)" <ji...@codehaus.org>.
[ https://jira.codehaus.org/browse/MRESOURCES-146?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dennis Lundberg updated MRESOURCES-146:
---------------------------------------
Description:
I have several files in src/main/webResources, but using maven-resources-plugin to do the filtering as maven-war-plugin doesn't support alternate delimiters (yet?).
Using the following alternate delimiters for filtering: {{<<*>>}}
Configured as follows:
{code}
<build>
<filters>
<filter>src/main/filters/common.properties</filter>
</filters>
<plugins>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>${resources.version}</version>
<executions>
<execution>
<id>copy-webresources</id>
<phase>generate-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<delimiters>
<delimiter><<*>></delimiter>
</delimiters>
<useDefaultDelimiters>${default.delim}</useDefaultDelimiters>
<outputDirectory>${project.build.directory}/${project.build.finalName}</outputDirectory>
<overwrite>true</overwrite>
<resources>
<resource>
<directory>src/main/webResources</directory>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
{code}
With version 2.4.3:
- set useDefaultDelimiters to true (the default) and only some files get filtered (same ones all the time). Filters both alternate and default delimiters when filters at all.
- set useDefaultDelimiters to false and all files get filtered (alternate delimiters only).
With version 2.5:
- doesn't filter alternate delimiters at all. Filters defaults when set to true.
Output from test runs with attached project:
EXAMPLE1: 2.4.3 with default delimiters enabled:
{noformat}
$ mvn clean package -Dresources.version=2.4.3 -Ddefault.delim=true [INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building mvn-resources-test Maven Webapp 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ mvn-resources-test ---
[INFO] Deleting /build/merges/matt/maven-resources-test/mvn-resources-test/target
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:copy-resources (copy-webresources) @ mvn-resources-test ---
[WARNING] File encoding has not been set, using platform encoding ISO-8859-1, i.e. build is platform dependent!
[WARNING] Using platform encoding (ISO-8859-1 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 7 resources
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ mvn-resources-test ---
[WARNING] Using platform encoding (ISO-8859-1 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ mvn-resources-test ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:testResources (default-testResources) @ mvn-resources-test ---
[WARNING] Using platform encoding (ISO-8859-1 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /build/merges/matt/maven-resources-test/mvn-resources-test/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ mvn-resources-test ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.7.1:test (default-test) @ mvn-resources-test ---
[INFO] No tests to run.
[INFO] Surefire report directory: /build/merges/matt/maven-resources-test/mvn-resources-test/target/surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
There are no tests to run.
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] --- maven-war-plugin:2.1.1:war (default-war) @ mvn-resources-test ---
[INFO] Packaging webapp
[INFO] Assembling webapp [mvn-resources-test] in [/build/merges/matt/maven-resources-test/mvn-resources-test/target/mvn-resources-test]
[INFO] Processing war project
[INFO] Copying webapp resources [/build/merges/matt/maven-resources-test/mvn-resources-test/src/main/webapp]
[INFO] Webapp assembled in [30 msecs]
[INFO] Building war: /build/merges/matt/maven-resources-test/mvn-resources-test/target/mvn-resources-test.war
[INFO] WEB-INF/web.xml already added, skipping
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.497s
[INFO] Finished at: Fri May 27 14:34:19 MDT 2011
[INFO] Final Memory: 11M/981M
[INFO] ------------------------------------------------------------------------
{noformat}
{noformat}
$ grep -H lsdId ./target/mvn-resources-test/default/lobby/includes/jsp/header.jsp \
./target/mvn-resources-test/default/client/includes/jsp/header.jsp \
./target/mvn-resources-test/default/game/includes/jsp/header.jsp \
./target/mvn-resources-test/default/webmasters/includes/jsp/header.jsp \
./target/mvn-resources-test/default/multiplayerlobby/includes/jsp/header.jsp \
./target/mvn-resources-test/default/members/includes/jsp/header.jsp \
./target/mvn-resources-test/default/client/WEB-INF/classes/global.properties
./target/mvn-resources-test/default/lobby/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
./target/mvn-resources-test/default/lobby/includes/jsp/header.jsp: String lsdId = "${lsdId}";
./target/mvn-resources-test/default/client/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
./target/mvn-resources-test/default/client/includes/jsp/header.jsp: String lsdId = "${lsdId}";
./target/mvn-resources-test/default/game/includes/jsp/header.jsp: String lsdId = "zero";
./target/mvn-resources-test/default/game/includes/jsp/header.jsp: String lsdId = "zero";
./target/mvn-resources-test/default/webmasters/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
./target/mvn-resources-test/default/webmasters/includes/jsp/header.jsp: String lsdId = "${lsdId}";
./target/mvn-resources-test/default/multiplayerlobby/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
./target/mvn-resources-test/default/multiplayerlobby/includes/jsp/header.jsp: String lsdId = "${lsdId}";
./target/mvn-resources-test/default/members/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
./target/mvn-resources-test/default/members/includes/jsp/header.jsp: String lsdId = "${lsdId}";
./target/mvn-resources-test/default/client/WEB-INF/classes/global.properties:lsdId=zero
./target/mvn-resources-test/default/client/WEB-INF/classes/global.properties:lsdId=zero
{noformat}
EXAMPLE2: 2.4.3 with default delimiters disabled:
{noformat}
$ mvn clean package -Dresources.version=2.4.3 -Ddefault.delim=false
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building mvn-resources-test Maven Webapp 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ mvn-resources-test ---
[INFO] Deleting /build/merges/matt/maven-resources-test/mvn-resources-test/target
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:copy-resources (copy-webresources) @ mvn-resources-test ---
[WARNING] File encoding has not been set, using platform encoding ISO-8859-1, i.e. build is platform dependent!
[WARNING] Using platform encoding (ISO-8859-1 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 7 resources
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ mvn-resources-test ---
[WARNING] Using platform encoding (ISO-8859-1 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ mvn-resources-test ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:testResources (default-testResources) @ mvn-resources-test ---
[WARNING] Using platform encoding (ISO-8859-1 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /build/merges/matt/maven-resources-test/mvn-resources-test/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ mvn-resources-test ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.7.1:test (default-test) @ mvn-resources-test ---
[INFO] No tests to run.
[INFO] Surefire report directory: /build/merges/matt/maven-resources-test/mvn-resources-test/target/surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
There are no tests to run.
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] --- maven-war-plugin:2.1.1:war (default-war) @ mvn-resources-test ---
[INFO] Packaging webapp
[INFO] Assembling webapp [mvn-resources-test] in [/build/merges/matt/maven-resources-test/mvn-resources-test/target/mvn-resources-test]
[INFO] Processing war project
[INFO] Copying webapp resources [/build/merges/matt/maven-resources-test/mvn-resources-test/src/main/webapp]
[INFO] Webapp assembled in [31 msecs]
[INFO] Building war: /build/merges/matt/maven-resources-test/mvn-resources-test/target/mvn-resources-test.war
[INFO] WEB-INF/web.xml already added, skipping
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.495s
[INFO] Finished at: Fri May 27 14:39:09 MDT 2011
[INFO] Final Memory: 10M/981M
[INFO] ------------------------------------------------------------------------
{noformat}
{noformat}
$ grep -H lsdId ./target/mvn-resources-test/default/lobby/includes/jsp/header.jsp \
./target/mvn-resources-test/default/client/includes/jsp/header.jsp \
./target/mvn-resources-test/default/game/includes/jsp/header.jsp \
./target/mvn-resources-test/default/webmasters/includes/jsp/header.jsp \
./target/mvn-resources-test/default/multiplayerlobby/includes/jsp/header.jsp \
./target/mvn-resources-test/default/members/includes/jsp/header.jsp \
./target/mvn-resources-test/default/client/WEB-INF/classes/global.properties
./target/mvn-resources-test/default/lobby/includes/jsp/header.jsp: String lsdId = "zero";
./target/mvn-resources-test/default/lobby/includes/jsp/header.jsp: String lsdId = "${lsdId}";
./target/mvn-resources-test/default/client/includes/jsp/header.jsp: String lsdId = "zero";
./target/mvn-resources-test/default/client/includes/jsp/header.jsp: String lsdId = "${lsdId}";
./target/mvn-resources-test/default/game/includes/jsp/header.jsp: String lsdId = "zero";
./target/mvn-resources-test/default/game/includes/jsp/header.jsp: String lsdId = "${lsdId}";
./target/mvn-resources-test/default/webmasters/includes/jsp/header.jsp: String lsdId = "zero";
./target/mvn-resources-test/default/webmasters/includes/jsp/header.jsp: String lsdId = "${lsdId}";
./target/mvn-resources-test/default/multiplayerlobby/includes/jsp/header.jsp: String lsdId = "zero";
./target/mvn-resources-test/default/multiplayerlobby/includes/jsp/header.jsp: String lsdId = "${lsdId}";
./target/mvn-resources-test/default/members/includes/jsp/header.jsp: String lsdId = "zero";
./target/mvn-resources-test/default/members/includes/jsp/header.jsp: String lsdId = "${lsdId}";
./target/mvn-resources-test/default/client/WEB-INF/classes/global.properties:lsdId=zero
./target/mvn-resources-test/default/client/WEB-INF/classes/global.properties:lsdId=${lsdId}
{noformat}
EXAMPLE3: 2.5 with default delimiters enabled:
{noformat}
$ mvn clean package -Dresources.version=2.5 -Ddefault.delim=true
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building mvn-resources-test Maven Webapp 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ mvn-resources-test ---
[INFO] Deleting /build/merges/matt/maven-resources-test/mvn-resources-test/target
[INFO]
[INFO] --- maven-resources-plugin:2.5:copy-resources (copy-webresources) @ mvn-resources-test ---
[debug] execute contextualize
[WARNING] File encoding has not been set, using platform encoding ISO-8859-1, i.e. build is platform dependent!
[WARNING] Using platform encoding (ISO-8859-1 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 7 resources
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ mvn-resources-test ---
[debug] execute contextualize
[WARNING] Using platform encoding (ISO-8859-1 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ mvn-resources-test ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ mvn-resources-test ---
[debug] execute contextualize
[WARNING] Using platform encoding (ISO-8859-1 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /build/merges/matt/maven-resources-test/mvn-resources-test/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ mvn-resources-test ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.7.1:test (default-test) @ mvn-resources-test ---
[INFO] No tests to run.
[INFO] Surefire report directory: /build/merges/matt/maven-resources-test/mvn-resources-test/target/surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
There are no tests to run.
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] --- maven-war-plugin:2.1.1:war (default-war) @ mvn-resources-test ---
[INFO] Packaging webapp
[INFO] Assembling webapp [mvn-resources-test] in [/build/merges/matt/maven-resources-test/mvn-resources-test/target/mvn-resources-test]
[INFO] Processing war project
[INFO] Copying webapp resources [/build/merges/matt/maven-resources-test/mvn-resources-test/src/main/webapp]
[INFO] Webapp assembled in [30 msecs]
[INFO] Building war: /build/merges/matt/maven-resources-test/mvn-resources-test/target/mvn-resources-test.war
[INFO] WEB-INF/web.xml already added, skipping
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.510s
[INFO] Finished at: Fri May 27 14:40:31 MDT 2011
[INFO] Final Memory: 11M/981M
[INFO] ------------------------------------------------------------------------
{noformat}
{noformat}
$ grep -H lsdId ./target/mvn-resources-test/default/lobby/includes/jsp/header.jsp \
./target/mvn-resources-test/default/client/includes/jsp/header.jsp \
./target/mvn-resources-test/default/game/includes/jsp/header.jsp \
./target/mvn-resources-test/default/webmasters/includes/jsp/header.jsp \
./target/mvn-resources-test/default/multiplayerlobby/includes/jsp/header.jsp \
./target/mvn-resources-test/default/members/includes/jsp/header.jsp \
./target/mvn-resources-test/default/client/WEB-INF/classes/global.properties
./target/mvn-resources-test/default/lobby/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
./target/mvn-resources-test/default/lobby/includes/jsp/header.jsp: String lsdId = "zero";
./target/mvn-resources-test/default/client/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
./target/mvn-resources-test/default/client/includes/jsp/header.jsp: String lsdId = "zero";
./target/mvn-resources-test/default/game/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
./target/mvn-resources-test/default/game/includes/jsp/header.jsp: String lsdId = "zero";
./target/mvn-resources-test/default/webmasters/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
./target/mvn-resources-test/default/webmasters/includes/jsp/header.jsp: String lsdId = "zero";
./target/mvn-resources-test/default/multiplayerlobby/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
./target/mvn-resources-test/default/multiplayerlobby/includes/jsp/header.jsp: String lsdId = "zero";
./target/mvn-resources-test/default/members/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
./target/mvn-resources-test/default/members/includes/jsp/header.jsp: String lsdId = "zero";
./target/mvn-resources-test/default/client/WEB-INF/classes/global.properties:lsdId=<<lsdId>>
./target/mvn-resources-test/default/client/WEB-INF/classes/global.properties:lsdId=zero
{noformat}
EXAMPLE4: 2.5 with default delimiters disabled:
{noformat}
$ mvn clean package -Dresources.version=2.5 -Ddefault.delim=false
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building mvn-resources-test Maven Webapp 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ mvn-resources-test ---
[INFO] Deleting /build/merges/matt/maven-resources-test/mvn-resources-test/target
[INFO]
[INFO] --- maven-resources-plugin:2.5:copy-resources (copy-webresources) @ mvn-resources-test ---
[debug] execute contextualize
[WARNING] File encoding has not been set, using platform encoding ISO-8859-1, i.e. build is platform dependent!
[WARNING] Using platform encoding (ISO-8859-1 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 7 resources
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ mvn-resources-test ---
[debug] execute contextualize
[WARNING] Using platform encoding (ISO-8859-1 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ mvn-resources-test ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ mvn-resources-test ---
[debug] execute contextualize
[WARNING] Using platform encoding (ISO-8859-1 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /build/merges/matt/maven-resources-test/mvn-resources-test/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ mvn-resources-test ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.7.1:test (default-test) @ mvn-resources-test ---
[INFO] No tests to run.
[INFO] Surefire report directory: /build/merges/matt/maven-resources-test/mvn-resources-test/target/surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
There are no tests to run.
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] --- maven-war-plugin:2.1.1:war (default-war) @ mvn-resources-test ---
[INFO] Packaging webapp
[INFO] Assembling webapp [mvn-resources-test] in [/build/merges/matt/maven-resources-test/mvn-resources-test/target/mvn-resources-test]
[INFO] Processing war project
[INFO] Copying webapp resources [/build/merges/matt/maven-resources-test/mvn-resources-test/src/main/webapp]
[INFO] Webapp assembled in [29 msecs]
[INFO] Building war: /build/merges/matt/maven-resources-test/mvn-resources-test/target/mvn-resources-test.war
[INFO] WEB-INF/web.xml already added, skipping
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.508s
[INFO] Finished at: Fri May 27 14:41:40 MDT 2011
[INFO] Final Memory: 11M/981M
[INFO] ------------------------------------------------------------------------
{noformat}
{noformat}
$ grep -H lsdId ./target/mvn-resources-test/default/lobby/includes/jsp/header.jsp \
./target/mvn-resources-test/default/client/includes/jsp/header.jsp \
./target/mvn-resources-test/default/game/includes/jsp/header.jsp \
./target/mvn-resources-test/default/webmasters/includes/jsp/header.jsp \
./target/mvn-resources-test/default/multiplayerlobby/includes/jsp/header.jsp \
./target/mvn-resources-test/default/members/includes/jsp/header.jsp \
./target/mvn-resources-test/default/client/WEB-INF/classes/global.properties
./target/mvn-resources-test/default/lobby/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
./target/mvn-resources-test/default/lobby/includes/jsp/header.jsp: String lsdId = "${lsdId}";
./target/mvn-resources-test/default/client/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
./target/mvn-resources-test/default/client/includes/jsp/header.jsp: String lsdId = "${lsdId}";
./target/mvn-resources-test/default/game/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
./target/mvn-resources-test/default/game/includes/jsp/header.jsp: String lsdId = "${lsdId}";
./target/mvn-resources-test/default/webmasters/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
./target/mvn-resources-test/default/webmasters/includes/jsp/header.jsp: String lsdId = "${lsdId}";
./target/mvn-resources-test/default/multiplayerlobby/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
./target/mvn-resources-test/default/multiplayerlobby/includes/jsp/header.jsp: String lsdId = "${lsdId}";
./target/mvn-resources-test/default/members/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
./target/mvn-resources-test/default/members/includes/jsp/header.jsp: String lsdId = "${lsdId}";
./target/mvn-resources-test/default/client/WEB-INF/classes/global.properties:lsdId=<<lsdId>>
./target/mvn-resources-test/default/client/WEB-INF/classes/global.properties:lsdId=${lsdId}
{noformat}
My test project is attached.
was:
I have several files in src/main/webResources, but using maven-resources-plugin to do the filtering as maven-war-plugin doesn't support alternate delimiters (yet?).
Using the following alternate delimiters for filtering: <<*>>
Configured as follows:
<build>
<filters>
<filter>src/main/filters/common.properties</filter>
</filters>
<plugins>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>${resources.version}</version>
<executions>
<execution>
<id>copy-webresources</id>
<phase>generate-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<delimiters>
<delimiter><<*>></delimiter>
</delimiters>
<useDefaultDelimiters>${default.delim}</useDefaultDelimiters>
<outputDirectory>${project.build.directory}/${project.build.finalName}</outputDirectory>
<overwrite>true</overwrite>
<resources>
<resource>
<directory>src/main/webResources</directory>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
With version 2.4.3:
- set useDefaultDelimiters to true (the default) and only some files get filtered (same ones all the time). Filters both alternate and default delimiters when filters at all.
- set useDefaultDelimiters to false and all files get filtered (alternate delimiters only).
With version 2.5:
- doesn't filter alternate delimiters at all. Filters defaults when set to true.
Output from test runs with attached project:
EXAMPLE1: 2.4.3 with default delimiters enabled:
$ mvn clean package -Dresources.version=2.4.3 -Ddefault.delim=true [INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building mvn-resources-test Maven Webapp 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ mvn-resources-test ---
[INFO] Deleting /build/merges/matt/maven-resources-test/mvn-resources-test/target
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:copy-resources (copy-webresources) @ mvn-resources-test ---
[WARNING] File encoding has not been set, using platform encoding ISO-8859-1, i.e. build is platform dependent!
[WARNING] Using platform encoding (ISO-8859-1 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 7 resources
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ mvn-resources-test ---
[WARNING] Using platform encoding (ISO-8859-1 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ mvn-resources-test ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:testResources (default-testResources) @ mvn-resources-test ---
[WARNING] Using platform encoding (ISO-8859-1 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /build/merges/matt/maven-resources-test/mvn-resources-test/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ mvn-resources-test ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.7.1:test (default-test) @ mvn-resources-test ---
[INFO] No tests to run.
[INFO] Surefire report directory: /build/merges/matt/maven-resources-test/mvn-resources-test/target/surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
There are no tests to run.
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] --- maven-war-plugin:2.1.1:war (default-war) @ mvn-resources-test ---
[INFO] Packaging webapp
[INFO] Assembling webapp [mvn-resources-test] in [/build/merges/matt/maven-resources-test/mvn-resources-test/target/mvn-resources-test]
[INFO] Processing war project
[INFO] Copying webapp resources [/build/merges/matt/maven-resources-test/mvn-resources-test/src/main/webapp]
[INFO] Webapp assembled in [30 msecs]
[INFO] Building war: /build/merges/matt/maven-resources-test/mvn-resources-test/target/mvn-resources-test.war
[INFO] WEB-INF/web.xml already added, skipping
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.497s
[INFO] Finished at: Fri May 27 14:34:19 MDT 2011
[INFO] Final Memory: 11M/981M
[INFO] ------------------------------------------------------------------------
$ grep -H lsdId ./target/mvn-resources-test/default/lobby/includes/jsp/header.jsp \
./target/mvn-resources-test/default/client/includes/jsp/header.jsp \
./target/mvn-resources-test/default/game/includes/jsp/header.jsp \
./target/mvn-resources-test/default/webmasters/includes/jsp/header.jsp \
./target/mvn-resources-test/default/multiplayerlobby/includes/jsp/header.jsp \
./target/mvn-resources-test/default/members/includes/jsp/header.jsp \
./target/mvn-resources-test/default/client/WEB-INF/classes/global.properties
./target/mvn-resources-test/default/lobby/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
./target/mvn-resources-test/default/lobby/includes/jsp/header.jsp: String lsdId = "${lsdId}";
./target/mvn-resources-test/default/client/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
./target/mvn-resources-test/default/client/includes/jsp/header.jsp: String lsdId = "${lsdId}";
./target/mvn-resources-test/default/game/includes/jsp/header.jsp: String lsdId = "zero";
./target/mvn-resources-test/default/game/includes/jsp/header.jsp: String lsdId = "zero";
./target/mvn-resources-test/default/webmasters/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
./target/mvn-resources-test/default/webmasters/includes/jsp/header.jsp: String lsdId = "${lsdId}";
./target/mvn-resources-test/default/multiplayerlobby/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
./target/mvn-resources-test/default/multiplayerlobby/includes/jsp/header.jsp: String lsdId = "${lsdId}";
./target/mvn-resources-test/default/members/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
./target/mvn-resources-test/default/members/includes/jsp/header.jsp: String lsdId = "${lsdId}";
./target/mvn-resources-test/default/client/WEB-INF/classes/global.properties:lsdId=zero
./target/mvn-resources-test/default/client/WEB-INF/classes/global.properties:lsdId=zero
EXAMPLE2: 2.4.3 with default delimiters disabled:
$ mvn clean package -Dresources.version=2.4.3 -Ddefault.delim=false
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building mvn-resources-test Maven Webapp 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ mvn-resources-test ---
[INFO] Deleting /build/merges/matt/maven-resources-test/mvn-resources-test/target
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:copy-resources (copy-webresources) @ mvn-resources-test ---
[WARNING] File encoding has not been set, using platform encoding ISO-8859-1, i.e. build is platform dependent!
[WARNING] Using platform encoding (ISO-8859-1 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 7 resources
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ mvn-resources-test ---
[WARNING] Using platform encoding (ISO-8859-1 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ mvn-resources-test ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:testResources (default-testResources) @ mvn-resources-test ---
[WARNING] Using platform encoding (ISO-8859-1 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /build/merges/matt/maven-resources-test/mvn-resources-test/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ mvn-resources-test ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.7.1:test (default-test) @ mvn-resources-test ---
[INFO] No tests to run.
[INFO] Surefire report directory: /build/merges/matt/maven-resources-test/mvn-resources-test/target/surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
There are no tests to run.
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] --- maven-war-plugin:2.1.1:war (default-war) @ mvn-resources-test ---
[INFO] Packaging webapp
[INFO] Assembling webapp [mvn-resources-test] in [/build/merges/matt/maven-resources-test/mvn-resources-test/target/mvn-resources-test]
[INFO] Processing war project
[INFO] Copying webapp resources [/build/merges/matt/maven-resources-test/mvn-resources-test/src/main/webapp]
[INFO] Webapp assembled in [31 msecs]
[INFO] Building war: /build/merges/matt/maven-resources-test/mvn-resources-test/target/mvn-resources-test.war
[INFO] WEB-INF/web.xml already added, skipping
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.495s
[INFO] Finished at: Fri May 27 14:39:09 MDT 2011
[INFO] Final Memory: 10M/981M
[INFO] ------------------------------------------------------------------------
$ grep -H lsdId ./target/mvn-resources-test/default/lobby/includes/jsp/header.jsp \
./target/mvn-resources-test/default/client/includes/jsp/header.jsp \
./target/mvn-resources-test/default/game/includes/jsp/header.jsp \
./target/mvn-resources-test/default/webmasters/includes/jsp/header.jsp \
./target/mvn-resources-test/default/multiplayerlobby/includes/jsp/header.jsp \
./target/mvn-resources-test/default/members/includes/jsp/header.jsp \
./target/mvn-resources-test/default/client/WEB-INF/classes/global.properties
./target/mvn-resources-test/default/lobby/includes/jsp/header.jsp: String lsdId = "zero";
./target/mvn-resources-test/default/lobby/includes/jsp/header.jsp: String lsdId = "${lsdId}";
./target/mvn-resources-test/default/client/includes/jsp/header.jsp: String lsdId = "zero";
./target/mvn-resources-test/default/client/includes/jsp/header.jsp: String lsdId = "${lsdId}";
./target/mvn-resources-test/default/game/includes/jsp/header.jsp: String lsdId = "zero";
./target/mvn-resources-test/default/game/includes/jsp/header.jsp: String lsdId = "${lsdId}";
./target/mvn-resources-test/default/webmasters/includes/jsp/header.jsp: String lsdId = "zero";
./target/mvn-resources-test/default/webmasters/includes/jsp/header.jsp: String lsdId = "${lsdId}";
./target/mvn-resources-test/default/multiplayerlobby/includes/jsp/header.jsp: String lsdId = "zero";
./target/mvn-resources-test/default/multiplayerlobby/includes/jsp/header.jsp: String lsdId = "${lsdId}";
./target/mvn-resources-test/default/members/includes/jsp/header.jsp: String lsdId = "zero";
./target/mvn-resources-test/default/members/includes/jsp/header.jsp: String lsdId = "${lsdId}";
./target/mvn-resources-test/default/client/WEB-INF/classes/global.properties:lsdId=zero
./target/mvn-resources-test/default/client/WEB-INF/classes/global.properties:lsdId=${lsdId}
EXAMPLE3: 2.5 with default delimiters enabled:
$ mvn clean package -Dresources.version=2.5 -Ddefault.delim=true
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building mvn-resources-test Maven Webapp 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ mvn-resources-test ---
[INFO] Deleting /build/merges/matt/maven-resources-test/mvn-resources-test/target
[INFO]
[INFO] --- maven-resources-plugin:2.5:copy-resources (copy-webresources) @ mvn-resources-test ---
[debug] execute contextualize
[WARNING] File encoding has not been set, using platform encoding ISO-8859-1, i.e. build is platform dependent!
[WARNING] Using platform encoding (ISO-8859-1 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 7 resources
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ mvn-resources-test ---
[debug] execute contextualize
[WARNING] Using platform encoding (ISO-8859-1 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ mvn-resources-test ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ mvn-resources-test ---
[debug] execute contextualize
[WARNING] Using platform encoding (ISO-8859-1 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /build/merges/matt/maven-resources-test/mvn-resources-test/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ mvn-resources-test ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.7.1:test (default-test) @ mvn-resources-test ---
[INFO] No tests to run.
[INFO] Surefire report directory: /build/merges/matt/maven-resources-test/mvn-resources-test/target/surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
There are no tests to run.
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] --- maven-war-plugin:2.1.1:war (default-war) @ mvn-resources-test ---
[INFO] Packaging webapp
[INFO] Assembling webapp [mvn-resources-test] in [/build/merges/matt/maven-resources-test/mvn-resources-test/target/mvn-resources-test]
[INFO] Processing war project
[INFO] Copying webapp resources [/build/merges/matt/maven-resources-test/mvn-resources-test/src/main/webapp]
[INFO] Webapp assembled in [30 msecs]
[INFO] Building war: /build/merges/matt/maven-resources-test/mvn-resources-test/target/mvn-resources-test.war
[INFO] WEB-INF/web.xml already added, skipping
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.510s
[INFO] Finished at: Fri May 27 14:40:31 MDT 2011
[INFO] Final Memory: 11M/981M
[INFO] ------------------------------------------------------------------------
$ grep -H lsdId ./target/mvn-resources-test/default/lobby/includes/jsp/header.jsp \
./target/mvn-resources-test/default/client/includes/jsp/header.jsp \
./target/mvn-resources-test/default/game/includes/jsp/header.jsp \
./target/mvn-resources-test/default/webmasters/includes/jsp/header.jsp \
./target/mvn-resources-test/default/multiplayerlobby/includes/jsp/header.jsp \
./target/mvn-resources-test/default/members/includes/jsp/header.jsp \
./target/mvn-resources-test/default/client/WEB-INF/classes/global.properties
./target/mvn-resources-test/default/lobby/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
./target/mvn-resources-test/default/lobby/includes/jsp/header.jsp: String lsdId = "zero";
./target/mvn-resources-test/default/client/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
./target/mvn-resources-test/default/client/includes/jsp/header.jsp: String lsdId = "zero";
./target/mvn-resources-test/default/game/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
./target/mvn-resources-test/default/game/includes/jsp/header.jsp: String lsdId = "zero";
./target/mvn-resources-test/default/webmasters/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
./target/mvn-resources-test/default/webmasters/includes/jsp/header.jsp: String lsdId = "zero";
./target/mvn-resources-test/default/multiplayerlobby/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
./target/mvn-resources-test/default/multiplayerlobby/includes/jsp/header.jsp: String lsdId = "zero";
./target/mvn-resources-test/default/members/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
./target/mvn-resources-test/default/members/includes/jsp/header.jsp: String lsdId = "zero";
./target/mvn-resources-test/default/client/WEB-INF/classes/global.properties:lsdId=<<lsdId>>
./target/mvn-resources-test/default/client/WEB-INF/classes/global.properties:lsdId=zero
EXAMPLE4: 2.5 with default delimiters disabled:
$ mvn clean package -Dresources.version=2.5 -Ddefault.delim=false [INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building mvn-resources-test Maven Webapp 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ mvn-resources-test ---
[INFO] Deleting /build/merges/matt/maven-resources-test/mvn-resources-test/target
[INFO]
[INFO] --- maven-resources-plugin:2.5:copy-resources (copy-webresources) @ mvn-resources-test ---
[debug] execute contextualize
[WARNING] File encoding has not been set, using platform encoding ISO-8859-1, i.e. build is platform dependent!
[WARNING] Using platform encoding (ISO-8859-1 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 7 resources
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ mvn-resources-test ---
[debug] execute contextualize
[WARNING] Using platform encoding (ISO-8859-1 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ mvn-resources-test ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ mvn-resources-test ---
[debug] execute contextualize
[WARNING] Using platform encoding (ISO-8859-1 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /build/merges/matt/maven-resources-test/mvn-resources-test/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ mvn-resources-test ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.7.1:test (default-test) @ mvn-resources-test ---
[INFO] No tests to run.
[INFO] Surefire report directory: /build/merges/matt/maven-resources-test/mvn-resources-test/target/surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
There are no tests to run.
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] --- maven-war-plugin:2.1.1:war (default-war) @ mvn-resources-test ---
[INFO] Packaging webapp
[INFO] Assembling webapp [mvn-resources-test] in [/build/merges/matt/maven-resources-test/mvn-resources-test/target/mvn-resources-test]
[INFO] Processing war project
[INFO] Copying webapp resources [/build/merges/matt/maven-resources-test/mvn-resources-test/src/main/webapp]
[INFO] Webapp assembled in [29 msecs]
[INFO] Building war: /build/merges/matt/maven-resources-test/mvn-resources-test/target/mvn-resources-test.war
[INFO] WEB-INF/web.xml already added, skipping
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.508s
[INFO] Finished at: Fri May 27 14:41:40 MDT 2011
[INFO] Final Memory: 11M/981M
[INFO] ------------------------------------------------------------------------
$ grep -H lsdId ./target/mvn-resources-test/default/lobby/includes/jsp/header.jsp \
./target/mvn-resources-test/default/client/includes/jsp/header.jsp \
./target/mvn-resources-test/default/game/includes/jsp/header.jsp \
./target/mvn-resources-test/default/webmasters/includes/jsp/header.jsp \
./target/mvn-resources-test/default/multiplayerlobby/includes/jsp/header.jsp \
./target/mvn-resources-test/default/members/includes/jsp/header.jsp \
./target/mvn-resources-test/default/client/WEB-INF/classes/global.properties
./target/mvn-resources-test/default/lobby/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
./target/mvn-resources-test/default/lobby/includes/jsp/header.jsp: String lsdId = "${lsdId}";
./target/mvn-resources-test/default/client/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
./target/mvn-resources-test/default/client/includes/jsp/header.jsp: String lsdId = "${lsdId}";
./target/mvn-resources-test/default/game/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
./target/mvn-resources-test/default/game/includes/jsp/header.jsp: String lsdId = "${lsdId}";
./target/mvn-resources-test/default/webmasters/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
./target/mvn-resources-test/default/webmasters/includes/jsp/header.jsp: String lsdId = "${lsdId}";
./target/mvn-resources-test/default/multiplayerlobby/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
./target/mvn-resources-test/default/multiplayerlobby/includes/jsp/header.jsp: String lsdId = "${lsdId}";
./target/mvn-resources-test/default/members/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
./target/mvn-resources-test/default/members/includes/jsp/header.jsp: String lsdId = "${lsdId}";
./target/mvn-resources-test/default/client/WEB-INF/classes/global.properties:lsdId=<<lsdId>>
./target/mvn-resources-test/default/client/WEB-INF/classes/global.properties:lsdId=${lsdId}
My test project is attached.
> Maven resources plugin doesn't filter all files all the time
> -------------------------------------------------------------
>
> Key: MRESOURCES-146
> URL: https://jira.codehaus.org/browse/MRESOURCES-146
> Project: Maven 2.x Resources Plugin
> Issue Type: Bug
> Components: delimiters, filtering
> Affects Versions: 2.4.3, 2.5
> Environment: Maven 3.0.2
> CentOS 5.5
> Reporter: Matt Walsh
> Attachments: mvn-resources-test.zip
>
>
> I have several files in src/main/webResources, but using maven-resources-plugin to do the filtering as maven-war-plugin doesn't support alternate delimiters (yet?).
> Using the following alternate delimiters for filtering: {{<<*>>}}
> Configured as follows:
> {code}
> <build>
> <filters>
> <filter>src/main/filters/common.properties</filter>
> </filters>
> <plugins>
> <plugin>
> <artifactId>maven-resources-plugin</artifactId>
> <version>${resources.version}</version>
> <executions>
> <execution>
> <id>copy-webresources</id>
> <phase>generate-resources</phase>
> <goals>
> <goal>copy-resources</goal>
> </goals>
> <configuration>
> <delimiters>
> <delimiter><<*>></delimiter>
> </delimiters>
> <useDefaultDelimiters>${default.delim}</useDefaultDelimiters>
> <outputDirectory>${project.build.directory}/${project.build.finalName}</outputDirectory>
> <overwrite>true</overwrite>
> <resources>
> <resource>
> <directory>src/main/webResources</directory>
> <filtering>true</filtering>
> </resource>
> </resources>
> </configuration>
> </execution>
> </executions>
> </plugin>
> </plugins>
> </build>
> {code}
> With version 2.4.3:
> - set useDefaultDelimiters to true (the default) and only some files get filtered (same ones all the time). Filters both alternate and default delimiters when filters at all.
> - set useDefaultDelimiters to false and all files get filtered (alternate delimiters only).
> With version 2.5:
> - doesn't filter alternate delimiters at all. Filters defaults when set to true.
> Output from test runs with attached project:
> EXAMPLE1: 2.4.3 with default delimiters enabled:
> {noformat}
> $ mvn clean package -Dresources.version=2.4.3 -Ddefault.delim=true [INFO] Scanning for projects...
> [INFO]
> [INFO] ------------------------------------------------------------------------
> [INFO] Building mvn-resources-test Maven Webapp 1.0-SNAPSHOT
> [INFO] ------------------------------------------------------------------------
> [INFO]
> [INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ mvn-resources-test ---
> [INFO] Deleting /build/merges/matt/maven-resources-test/mvn-resources-test/target
> [INFO]
> [INFO] --- maven-resources-plugin:2.4.3:copy-resources (copy-webresources) @ mvn-resources-test ---
> [WARNING] File encoding has not been set, using platform encoding ISO-8859-1, i.e. build is platform dependent!
> [WARNING] Using platform encoding (ISO-8859-1 actually) to copy filtered resources, i.e. build is platform dependent!
> [INFO] Copying 7 resources
> [INFO]
> [INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ mvn-resources-test ---
> [WARNING] Using platform encoding (ISO-8859-1 actually) to copy filtered resources, i.e. build is platform dependent!
> [INFO] Copying 0 resource
> [INFO]
> [INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ mvn-resources-test ---
> [INFO] No sources to compile
> [INFO]
> [INFO] --- maven-resources-plugin:2.4.3:testResources (default-testResources) @ mvn-resources-test ---
> [WARNING] Using platform encoding (ISO-8859-1 actually) to copy filtered resources, i.e. build is platform dependent!
> [INFO] skip non existing resourceDirectory /build/merges/matt/maven-resources-test/mvn-resources-test/src/test/resources
> [INFO]
> [INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ mvn-resources-test ---
> [INFO] No sources to compile
> [INFO]
> [INFO] --- maven-surefire-plugin:2.7.1:test (default-test) @ mvn-resources-test ---
> [INFO] No tests to run.
> [INFO] Surefire report directory: /build/merges/matt/maven-resources-test/mvn-resources-test/target/surefire-reports
> -------------------------------------------------------
> T E S T S
> -------------------------------------------------------
> There are no tests to run.
> Results :
> Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
> [INFO]
> [INFO] --- maven-war-plugin:2.1.1:war (default-war) @ mvn-resources-test ---
> [INFO] Packaging webapp
> [INFO] Assembling webapp [mvn-resources-test] in [/build/merges/matt/maven-resources-test/mvn-resources-test/target/mvn-resources-test]
> [INFO] Processing war project
> [INFO] Copying webapp resources [/build/merges/matt/maven-resources-test/mvn-resources-test/src/main/webapp]
> [INFO] Webapp assembled in [30 msecs]
> [INFO] Building war: /build/merges/matt/maven-resources-test/mvn-resources-test/target/mvn-resources-test.war
> [INFO] WEB-INF/web.xml already added, skipping
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 2.497s
> [INFO] Finished at: Fri May 27 14:34:19 MDT 2011
> [INFO] Final Memory: 11M/981M
> [INFO] ------------------------------------------------------------------------
> {noformat}
> {noformat}
> $ grep -H lsdId ./target/mvn-resources-test/default/lobby/includes/jsp/header.jsp \
> ./target/mvn-resources-test/default/client/includes/jsp/header.jsp \
> ./target/mvn-resources-test/default/game/includes/jsp/header.jsp \
> ./target/mvn-resources-test/default/webmasters/includes/jsp/header.jsp \
> ./target/mvn-resources-test/default/multiplayerlobby/includes/jsp/header.jsp \
> ./target/mvn-resources-test/default/members/includes/jsp/header.jsp \
> ./target/mvn-resources-test/default/client/WEB-INF/classes/global.properties
> ./target/mvn-resources-test/default/lobby/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
> ./target/mvn-resources-test/default/lobby/includes/jsp/header.jsp: String lsdId = "${lsdId}";
> ./target/mvn-resources-test/default/client/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
> ./target/mvn-resources-test/default/client/includes/jsp/header.jsp: String lsdId = "${lsdId}";
> ./target/mvn-resources-test/default/game/includes/jsp/header.jsp: String lsdId = "zero";
> ./target/mvn-resources-test/default/game/includes/jsp/header.jsp: String lsdId = "zero";
> ./target/mvn-resources-test/default/webmasters/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
> ./target/mvn-resources-test/default/webmasters/includes/jsp/header.jsp: String lsdId = "${lsdId}";
> ./target/mvn-resources-test/default/multiplayerlobby/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
> ./target/mvn-resources-test/default/multiplayerlobby/includes/jsp/header.jsp: String lsdId = "${lsdId}";
> ./target/mvn-resources-test/default/members/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
> ./target/mvn-resources-test/default/members/includes/jsp/header.jsp: String lsdId = "${lsdId}";
> ./target/mvn-resources-test/default/client/WEB-INF/classes/global.properties:lsdId=zero
> ./target/mvn-resources-test/default/client/WEB-INF/classes/global.properties:lsdId=zero
> {noformat}
> EXAMPLE2: 2.4.3 with default delimiters disabled:
> {noformat}
> $ mvn clean package -Dresources.version=2.4.3 -Ddefault.delim=false
> [INFO] Scanning for projects...
> [INFO]
> [INFO] ------------------------------------------------------------------------
> [INFO] Building mvn-resources-test Maven Webapp 1.0-SNAPSHOT
> [INFO] ------------------------------------------------------------------------
> [INFO]
> [INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ mvn-resources-test ---
> [INFO] Deleting /build/merges/matt/maven-resources-test/mvn-resources-test/target
> [INFO]
> [INFO] --- maven-resources-plugin:2.4.3:copy-resources (copy-webresources) @ mvn-resources-test ---
> [WARNING] File encoding has not been set, using platform encoding ISO-8859-1, i.e. build is platform dependent!
> [WARNING] Using platform encoding (ISO-8859-1 actually) to copy filtered resources, i.e. build is platform dependent!
> [INFO] Copying 7 resources
> [INFO]
> [INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ mvn-resources-test ---
> [WARNING] Using platform encoding (ISO-8859-1 actually) to copy filtered resources, i.e. build is platform dependent!
> [INFO] Copying 0 resource
> [INFO]
> [INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ mvn-resources-test ---
> [INFO] No sources to compile
> [INFO]
> [INFO] --- maven-resources-plugin:2.4.3:testResources (default-testResources) @ mvn-resources-test ---
> [WARNING] Using platform encoding (ISO-8859-1 actually) to copy filtered resources, i.e. build is platform dependent!
> [INFO] skip non existing resourceDirectory /build/merges/matt/maven-resources-test/mvn-resources-test/src/test/resources
> [INFO]
> [INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ mvn-resources-test ---
> [INFO] No sources to compile
> [INFO]
> [INFO] --- maven-surefire-plugin:2.7.1:test (default-test) @ mvn-resources-test ---
> [INFO] No tests to run.
> [INFO] Surefire report directory: /build/merges/matt/maven-resources-test/mvn-resources-test/target/surefire-reports
> -------------------------------------------------------
> T E S T S
> -------------------------------------------------------
> There are no tests to run.
> Results :
> Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
> [INFO]
> [INFO] --- maven-war-plugin:2.1.1:war (default-war) @ mvn-resources-test ---
> [INFO] Packaging webapp
> [INFO] Assembling webapp [mvn-resources-test] in [/build/merges/matt/maven-resources-test/mvn-resources-test/target/mvn-resources-test]
> [INFO] Processing war project
> [INFO] Copying webapp resources [/build/merges/matt/maven-resources-test/mvn-resources-test/src/main/webapp]
> [INFO] Webapp assembled in [31 msecs]
> [INFO] Building war: /build/merges/matt/maven-resources-test/mvn-resources-test/target/mvn-resources-test.war
> [INFO] WEB-INF/web.xml already added, skipping
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 2.495s
> [INFO] Finished at: Fri May 27 14:39:09 MDT 2011
> [INFO] Final Memory: 10M/981M
> [INFO] ------------------------------------------------------------------------
> {noformat}
> {noformat}
> $ grep -H lsdId ./target/mvn-resources-test/default/lobby/includes/jsp/header.jsp \
> ./target/mvn-resources-test/default/client/includes/jsp/header.jsp \
> ./target/mvn-resources-test/default/game/includes/jsp/header.jsp \
> ./target/mvn-resources-test/default/webmasters/includes/jsp/header.jsp \
> ./target/mvn-resources-test/default/multiplayerlobby/includes/jsp/header.jsp \
> ./target/mvn-resources-test/default/members/includes/jsp/header.jsp \
> ./target/mvn-resources-test/default/client/WEB-INF/classes/global.properties
> ./target/mvn-resources-test/default/lobby/includes/jsp/header.jsp: String lsdId = "zero";
> ./target/mvn-resources-test/default/lobby/includes/jsp/header.jsp: String lsdId = "${lsdId}";
> ./target/mvn-resources-test/default/client/includes/jsp/header.jsp: String lsdId = "zero";
> ./target/mvn-resources-test/default/client/includes/jsp/header.jsp: String lsdId = "${lsdId}";
> ./target/mvn-resources-test/default/game/includes/jsp/header.jsp: String lsdId = "zero";
> ./target/mvn-resources-test/default/game/includes/jsp/header.jsp: String lsdId = "${lsdId}";
> ./target/mvn-resources-test/default/webmasters/includes/jsp/header.jsp: String lsdId = "zero";
> ./target/mvn-resources-test/default/webmasters/includes/jsp/header.jsp: String lsdId = "${lsdId}";
> ./target/mvn-resources-test/default/multiplayerlobby/includes/jsp/header.jsp: String lsdId = "zero";
> ./target/mvn-resources-test/default/multiplayerlobby/includes/jsp/header.jsp: String lsdId = "${lsdId}";
> ./target/mvn-resources-test/default/members/includes/jsp/header.jsp: String lsdId = "zero";
> ./target/mvn-resources-test/default/members/includes/jsp/header.jsp: String lsdId = "${lsdId}";
> ./target/mvn-resources-test/default/client/WEB-INF/classes/global.properties:lsdId=zero
> ./target/mvn-resources-test/default/client/WEB-INF/classes/global.properties:lsdId=${lsdId}
> {noformat}
> EXAMPLE3: 2.5 with default delimiters enabled:
> {noformat}
> $ mvn clean package -Dresources.version=2.5 -Ddefault.delim=true
> [INFO] Scanning for projects...
> [INFO]
> [INFO] ------------------------------------------------------------------------
> [INFO] Building mvn-resources-test Maven Webapp 1.0-SNAPSHOT
> [INFO] ------------------------------------------------------------------------
> [INFO]
> [INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ mvn-resources-test ---
> [INFO] Deleting /build/merges/matt/maven-resources-test/mvn-resources-test/target
> [INFO]
> [INFO] --- maven-resources-plugin:2.5:copy-resources (copy-webresources) @ mvn-resources-test ---
> [debug] execute contextualize
> [WARNING] File encoding has not been set, using platform encoding ISO-8859-1, i.e. build is platform dependent!
> [WARNING] Using platform encoding (ISO-8859-1 actually) to copy filtered resources, i.e. build is platform dependent!
> [INFO] Copying 7 resources
> [INFO]
> [INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ mvn-resources-test ---
> [debug] execute contextualize
> [WARNING] Using platform encoding (ISO-8859-1 actually) to copy filtered resources, i.e. build is platform dependent!
> [INFO] Copying 0 resource
> [INFO]
> [INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ mvn-resources-test ---
> [INFO] No sources to compile
> [INFO]
> [INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ mvn-resources-test ---
> [debug] execute contextualize
> [WARNING] Using platform encoding (ISO-8859-1 actually) to copy filtered resources, i.e. build is platform dependent!
> [INFO] skip non existing resourceDirectory /build/merges/matt/maven-resources-test/mvn-resources-test/src/test/resources
> [INFO]
> [INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ mvn-resources-test ---
> [INFO] No sources to compile
> [INFO]
> [INFO] --- maven-surefire-plugin:2.7.1:test (default-test) @ mvn-resources-test ---
> [INFO] No tests to run.
> [INFO] Surefire report directory: /build/merges/matt/maven-resources-test/mvn-resources-test/target/surefire-reports
> -------------------------------------------------------
> T E S T S
> -------------------------------------------------------
> There are no tests to run.
> Results :
> Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
> [INFO]
> [INFO] --- maven-war-plugin:2.1.1:war (default-war) @ mvn-resources-test ---
> [INFO] Packaging webapp
> [INFO] Assembling webapp [mvn-resources-test] in [/build/merges/matt/maven-resources-test/mvn-resources-test/target/mvn-resources-test]
> [INFO] Processing war project
> [INFO] Copying webapp resources [/build/merges/matt/maven-resources-test/mvn-resources-test/src/main/webapp]
> [INFO] Webapp assembled in [30 msecs]
> [INFO] Building war: /build/merges/matt/maven-resources-test/mvn-resources-test/target/mvn-resources-test.war
> [INFO] WEB-INF/web.xml already added, skipping
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 2.510s
> [INFO] Finished at: Fri May 27 14:40:31 MDT 2011
> [INFO] Final Memory: 11M/981M
> [INFO] ------------------------------------------------------------------------
> {noformat}
> {noformat}
> $ grep -H lsdId ./target/mvn-resources-test/default/lobby/includes/jsp/header.jsp \
> ./target/mvn-resources-test/default/client/includes/jsp/header.jsp \
> ./target/mvn-resources-test/default/game/includes/jsp/header.jsp \
> ./target/mvn-resources-test/default/webmasters/includes/jsp/header.jsp \
> ./target/mvn-resources-test/default/multiplayerlobby/includes/jsp/header.jsp \
> ./target/mvn-resources-test/default/members/includes/jsp/header.jsp \
> ./target/mvn-resources-test/default/client/WEB-INF/classes/global.properties
> ./target/mvn-resources-test/default/lobby/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
> ./target/mvn-resources-test/default/lobby/includes/jsp/header.jsp: String lsdId = "zero";
> ./target/mvn-resources-test/default/client/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
> ./target/mvn-resources-test/default/client/includes/jsp/header.jsp: String lsdId = "zero";
> ./target/mvn-resources-test/default/game/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
> ./target/mvn-resources-test/default/game/includes/jsp/header.jsp: String lsdId = "zero";
> ./target/mvn-resources-test/default/webmasters/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
> ./target/mvn-resources-test/default/webmasters/includes/jsp/header.jsp: String lsdId = "zero";
> ./target/mvn-resources-test/default/multiplayerlobby/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
> ./target/mvn-resources-test/default/multiplayerlobby/includes/jsp/header.jsp: String lsdId = "zero";
> ./target/mvn-resources-test/default/members/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
> ./target/mvn-resources-test/default/members/includes/jsp/header.jsp: String lsdId = "zero";
> ./target/mvn-resources-test/default/client/WEB-INF/classes/global.properties:lsdId=<<lsdId>>
> ./target/mvn-resources-test/default/client/WEB-INF/classes/global.properties:lsdId=zero
> {noformat}
> EXAMPLE4: 2.5 with default delimiters disabled:
> {noformat}
> $ mvn clean package -Dresources.version=2.5 -Ddefault.delim=false
> [INFO] Scanning for projects...
> [INFO]
> [INFO] ------------------------------------------------------------------------
> [INFO] Building mvn-resources-test Maven Webapp 1.0-SNAPSHOT
> [INFO] ------------------------------------------------------------------------
> [INFO]
> [INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ mvn-resources-test ---
> [INFO] Deleting /build/merges/matt/maven-resources-test/mvn-resources-test/target
> [INFO]
> [INFO] --- maven-resources-plugin:2.5:copy-resources (copy-webresources) @ mvn-resources-test ---
> [debug] execute contextualize
> [WARNING] File encoding has not been set, using platform encoding ISO-8859-1, i.e. build is platform dependent!
> [WARNING] Using platform encoding (ISO-8859-1 actually) to copy filtered resources, i.e. build is platform dependent!
> [INFO] Copying 7 resources
> [INFO]
> [INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ mvn-resources-test ---
> [debug] execute contextualize
> [WARNING] Using platform encoding (ISO-8859-1 actually) to copy filtered resources, i.e. build is platform dependent!
> [INFO] Copying 0 resource
> [INFO]
> [INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ mvn-resources-test ---
> [INFO] No sources to compile
> [INFO]
> [INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ mvn-resources-test ---
> [debug] execute contextualize
> [WARNING] Using platform encoding (ISO-8859-1 actually) to copy filtered resources, i.e. build is platform dependent!
> [INFO] skip non existing resourceDirectory /build/merges/matt/maven-resources-test/mvn-resources-test/src/test/resources
> [INFO]
> [INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ mvn-resources-test ---
> [INFO] No sources to compile
> [INFO]
> [INFO] --- maven-surefire-plugin:2.7.1:test (default-test) @ mvn-resources-test ---
> [INFO] No tests to run.
> [INFO] Surefire report directory: /build/merges/matt/maven-resources-test/mvn-resources-test/target/surefire-reports
> -------------------------------------------------------
> T E S T S
> -------------------------------------------------------
> There are no tests to run.
> Results :
> Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
> [INFO]
> [INFO] --- maven-war-plugin:2.1.1:war (default-war) @ mvn-resources-test ---
> [INFO] Packaging webapp
> [INFO] Assembling webapp [mvn-resources-test] in [/build/merges/matt/maven-resources-test/mvn-resources-test/target/mvn-resources-test]
> [INFO] Processing war project
> [INFO] Copying webapp resources [/build/merges/matt/maven-resources-test/mvn-resources-test/src/main/webapp]
> [INFO] Webapp assembled in [29 msecs]
> [INFO] Building war: /build/merges/matt/maven-resources-test/mvn-resources-test/target/mvn-resources-test.war
> [INFO] WEB-INF/web.xml already added, skipping
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 2.508s
> [INFO] Finished at: Fri May 27 14:41:40 MDT 2011
> [INFO] Final Memory: 11M/981M
> [INFO] ------------------------------------------------------------------------
> {noformat}
> {noformat}
> $ grep -H lsdId ./target/mvn-resources-test/default/lobby/includes/jsp/header.jsp \
> ./target/mvn-resources-test/default/client/includes/jsp/header.jsp \
> ./target/mvn-resources-test/default/game/includes/jsp/header.jsp \
> ./target/mvn-resources-test/default/webmasters/includes/jsp/header.jsp \
> ./target/mvn-resources-test/default/multiplayerlobby/includes/jsp/header.jsp \
> ./target/mvn-resources-test/default/members/includes/jsp/header.jsp \
> ./target/mvn-resources-test/default/client/WEB-INF/classes/global.properties
> ./target/mvn-resources-test/default/lobby/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
> ./target/mvn-resources-test/default/lobby/includes/jsp/header.jsp: String lsdId = "${lsdId}";
> ./target/mvn-resources-test/default/client/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
> ./target/mvn-resources-test/default/client/includes/jsp/header.jsp: String lsdId = "${lsdId}";
> ./target/mvn-resources-test/default/game/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
> ./target/mvn-resources-test/default/game/includes/jsp/header.jsp: String lsdId = "${lsdId}";
> ./target/mvn-resources-test/default/webmasters/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
> ./target/mvn-resources-test/default/webmasters/includes/jsp/header.jsp: String lsdId = "${lsdId}";
> ./target/mvn-resources-test/default/multiplayerlobby/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
> ./target/mvn-resources-test/default/multiplayerlobby/includes/jsp/header.jsp: String lsdId = "${lsdId}";
> ./target/mvn-resources-test/default/members/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
> ./target/mvn-resources-test/default/members/includes/jsp/header.jsp: String lsdId = "${lsdId}";
> ./target/mvn-resources-test/default/client/WEB-INF/classes/global.properties:lsdId=<<lsdId>>
> ./target/mvn-resources-test/default/client/WEB-INF/classes/global.properties:lsdId=${lsdId}
> {noformat}
> My test project is attached.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MRESOURCES-146) Maven resources plugin doesn't
filter all files all the time
Posted by "Matt Walsh (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MRESOURCES-146?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=268761#action_268761 ]
Matt Walsh commented on MRESOURCES-146:
---------------------------------------
Note that the delimiters shown in the description are actually specified in the pom using the ampersand greater-than and ampersand less-than notation.
> Maven resources plugin doesn't filter all files all the time
> -------------------------------------------------------------
>
> Key: MRESOURCES-146
> URL: http://jira.codehaus.org/browse/MRESOURCES-146
> Project: Maven 2.x Resources Plugin
> Issue Type: Bug
> Components: delimiters, filtering
> Affects Versions: 2.4.3, 2.5
> Environment: Maven 3.0.2
> CentOS 5.5
> Reporter: Matt Walsh
> Attachments: mvn-resources-test.zip
>
>
> I have several files in src/main/webResources, but using maven-resources-plugin to do the filtering as maven-war-plugin doesn't support alternate delimiters (yet?).
> Using the following alternate delimiters for filtering: <<*>>
> Configured as follows:
> <build>
> <filters>
> <filter>src/main/filters/common.properties</filter>
> </filters>
> <plugins>
> <plugin>
> <artifactId>maven-resources-plugin</artifactId>
> <version>${resources.version}</version>
> <executions>
> <execution>
> <id>copy-webresources</id>
> <phase>generate-resources</phase>
> <goals>
> <goal>copy-resources</goal>
> </goals>
> <configuration>
> <delimiters>
> <delimiter><<*>></delimiter>
> </delimiters>
> <useDefaultDelimiters>${default.delim}</useDefaultDelimiters>
> <outputDirectory>${project.build.directory}/${project.build.finalName}</outputDirectory>
> <overwrite>true</overwrite>
> <resources>
> <resource>
> <directory>src/main/webResources</directory>
> <filtering>true</filtering>
> </resource>
> </resources>
> </configuration>
> </execution>
> </executions>
> </plugin>
> </plugins>
> </build>
> With version 2.4.3:
> - set useDefaultDelimiters to true (the default) and only some files get filtered (same ones all the time). Filters both alternate and default delimiters when filters at all.
> - set useDefaultDelimiters to false and all files get filtered (alternate delimiters only).
> With version 2.5:
> - doesn't filter alternate delimiters at all. Filters defaults when set to true.
> Output from test runs with attached project:
> EXAMPLE1: 2.4.3 with default delimiters enabled:
> $ mvn clean package -Dresources.version=2.4.3 -Ddefault.delim=true [INFO] Scanning for projects...
> [INFO]
> [INFO] ------------------------------------------------------------------------
> [INFO] Building mvn-resources-test Maven Webapp 1.0-SNAPSHOT
> [INFO] ------------------------------------------------------------------------
> [INFO]
> [INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ mvn-resources-test ---
> [INFO] Deleting /build/merges/matt/maven-resources-test/mvn-resources-test/target
> [INFO]
> [INFO] --- maven-resources-plugin:2.4.3:copy-resources (copy-webresources) @ mvn-resources-test ---
> [WARNING] File encoding has not been set, using platform encoding ISO-8859-1, i.e. build is platform dependent!
> [WARNING] Using platform encoding (ISO-8859-1 actually) to copy filtered resources, i.e. build is platform dependent!
> [INFO] Copying 7 resources
> [INFO]
> [INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ mvn-resources-test ---
> [WARNING] Using platform encoding (ISO-8859-1 actually) to copy filtered resources, i.e. build is platform dependent!
> [INFO] Copying 0 resource
> [INFO]
> [INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ mvn-resources-test ---
> [INFO] No sources to compile
> [INFO]
> [INFO] --- maven-resources-plugin:2.4.3:testResources (default-testResources) @ mvn-resources-test ---
> [WARNING] Using platform encoding (ISO-8859-1 actually) to copy filtered resources, i.e. build is platform dependent!
> [INFO] skip non existing resourceDirectory /build/merges/matt/maven-resources-test/mvn-resources-test/src/test/resources
> [INFO]
> [INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ mvn-resources-test ---
> [INFO] No sources to compile
> [INFO]
> [INFO] --- maven-surefire-plugin:2.7.1:test (default-test) @ mvn-resources-test ---
> [INFO] No tests to run.
> [INFO] Surefire report directory: /build/merges/matt/maven-resources-test/mvn-resources-test/target/surefire-reports
> -------------------------------------------------------
> T E S T S
> -------------------------------------------------------
> There are no tests to run.
> Results :
> Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
> [INFO]
> [INFO] --- maven-war-plugin:2.1.1:war (default-war) @ mvn-resources-test ---
> [INFO] Packaging webapp
> [INFO] Assembling webapp [mvn-resources-test] in [/build/merges/matt/maven-resources-test/mvn-resources-test/target/mvn-resources-test]
> [INFO] Processing war project
> [INFO] Copying webapp resources [/build/merges/matt/maven-resources-test/mvn-resources-test/src/main/webapp]
> [INFO] Webapp assembled in [30 msecs]
> [INFO] Building war: /build/merges/matt/maven-resources-test/mvn-resources-test/target/mvn-resources-test.war
> [INFO] WEB-INF/web.xml already added, skipping
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 2.497s
> [INFO] Finished at: Fri May 27 14:34:19 MDT 2011
> [INFO] Final Memory: 11M/981M
> [INFO] ------------------------------------------------------------------------
> $ grep -H lsdId ./target/mvn-resources-test/default/lobby/includes/jsp/header.jsp \
> ./target/mvn-resources-test/default/client/includes/jsp/header.jsp \
> ./target/mvn-resources-test/default/game/includes/jsp/header.jsp \
> ./target/mvn-resources-test/default/webmasters/includes/jsp/header.jsp \
> ./target/mvn-resources-test/default/multiplayerlobby/includes/jsp/header.jsp \
> ./target/mvn-resources-test/default/members/includes/jsp/header.jsp \
> ./target/mvn-resources-test/default/client/WEB-INF/classes/global.properties
> ./target/mvn-resources-test/default/lobby/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
> ./target/mvn-resources-test/default/lobby/includes/jsp/header.jsp: String lsdId = "${lsdId}";
> ./target/mvn-resources-test/default/client/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
> ./target/mvn-resources-test/default/client/includes/jsp/header.jsp: String lsdId = "${lsdId}";
> ./target/mvn-resources-test/default/game/includes/jsp/header.jsp: String lsdId = "zero";
> ./target/mvn-resources-test/default/game/includes/jsp/header.jsp: String lsdId = "zero";
> ./target/mvn-resources-test/default/webmasters/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
> ./target/mvn-resources-test/default/webmasters/includes/jsp/header.jsp: String lsdId = "${lsdId}";
> ./target/mvn-resources-test/default/multiplayerlobby/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
> ./target/mvn-resources-test/default/multiplayerlobby/includes/jsp/header.jsp: String lsdId = "${lsdId}";
> ./target/mvn-resources-test/default/members/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
> ./target/mvn-resources-test/default/members/includes/jsp/header.jsp: String lsdId = "${lsdId}";
> ./target/mvn-resources-test/default/client/WEB-INF/classes/global.properties:lsdId=zero
> ./target/mvn-resources-test/default/client/WEB-INF/classes/global.properties:lsdId=zero
> EXAMPLE2: 2.4.3 with default delimiters disabled:
> $ mvn clean package -Dresources.version=2.4.3 -Ddefault.delim=false
> [INFO] Scanning for projects...
> [INFO]
> [INFO] ------------------------------------------------------------------------
> [INFO] Building mvn-resources-test Maven Webapp 1.0-SNAPSHOT
> [INFO] ------------------------------------------------------------------------
> [INFO]
> [INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ mvn-resources-test ---
> [INFO] Deleting /build/merges/matt/maven-resources-test/mvn-resources-test/target
> [INFO]
> [INFO] --- maven-resources-plugin:2.4.3:copy-resources (copy-webresources) @ mvn-resources-test ---
> [WARNING] File encoding has not been set, using platform encoding ISO-8859-1, i.e. build is platform dependent!
> [WARNING] Using platform encoding (ISO-8859-1 actually) to copy filtered resources, i.e. build is platform dependent!
> [INFO] Copying 7 resources
> [INFO]
> [INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ mvn-resources-test ---
> [WARNING] Using platform encoding (ISO-8859-1 actually) to copy filtered resources, i.e. build is platform dependent!
> [INFO] Copying 0 resource
> [INFO]
> [INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ mvn-resources-test ---
> [INFO] No sources to compile
> [INFO]
> [INFO] --- maven-resources-plugin:2.4.3:testResources (default-testResources) @ mvn-resources-test ---
> [WARNING] Using platform encoding (ISO-8859-1 actually) to copy filtered resources, i.e. build is platform dependent!
> [INFO] skip non existing resourceDirectory /build/merges/matt/maven-resources-test/mvn-resources-test/src/test/resources
> [INFO]
> [INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ mvn-resources-test ---
> [INFO] No sources to compile
> [INFO]
> [INFO] --- maven-surefire-plugin:2.7.1:test (default-test) @ mvn-resources-test ---
> [INFO] No tests to run.
> [INFO] Surefire report directory: /build/merges/matt/maven-resources-test/mvn-resources-test/target/surefire-reports
> -------------------------------------------------------
> T E S T S
> -------------------------------------------------------
> There are no tests to run.
> Results :
> Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
> [INFO]
> [INFO] --- maven-war-plugin:2.1.1:war (default-war) @ mvn-resources-test ---
> [INFO] Packaging webapp
> [INFO] Assembling webapp [mvn-resources-test] in [/build/merges/matt/maven-resources-test/mvn-resources-test/target/mvn-resources-test]
> [INFO] Processing war project
> [INFO] Copying webapp resources [/build/merges/matt/maven-resources-test/mvn-resources-test/src/main/webapp]
> [INFO] Webapp assembled in [31 msecs]
> [INFO] Building war: /build/merges/matt/maven-resources-test/mvn-resources-test/target/mvn-resources-test.war
> [INFO] WEB-INF/web.xml already added, skipping
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 2.495s
> [INFO] Finished at: Fri May 27 14:39:09 MDT 2011
> [INFO] Final Memory: 10M/981M
> [INFO] ------------------------------------------------------------------------
> $ grep -H lsdId ./target/mvn-resources-test/default/lobby/includes/jsp/header.jsp \
> ./target/mvn-resources-test/default/client/includes/jsp/header.jsp \
> ./target/mvn-resources-test/default/game/includes/jsp/header.jsp \
> ./target/mvn-resources-test/default/webmasters/includes/jsp/header.jsp \
> ./target/mvn-resources-test/default/multiplayerlobby/includes/jsp/header.jsp \
> ./target/mvn-resources-test/default/members/includes/jsp/header.jsp \
> ./target/mvn-resources-test/default/client/WEB-INF/classes/global.properties
> ./target/mvn-resources-test/default/lobby/includes/jsp/header.jsp: String lsdId = "zero";
> ./target/mvn-resources-test/default/lobby/includes/jsp/header.jsp: String lsdId = "${lsdId}";
> ./target/mvn-resources-test/default/client/includes/jsp/header.jsp: String lsdId = "zero";
> ./target/mvn-resources-test/default/client/includes/jsp/header.jsp: String lsdId = "${lsdId}";
> ./target/mvn-resources-test/default/game/includes/jsp/header.jsp: String lsdId = "zero";
> ./target/mvn-resources-test/default/game/includes/jsp/header.jsp: String lsdId = "${lsdId}";
> ./target/mvn-resources-test/default/webmasters/includes/jsp/header.jsp: String lsdId = "zero";
> ./target/mvn-resources-test/default/webmasters/includes/jsp/header.jsp: String lsdId = "${lsdId}";
> ./target/mvn-resources-test/default/multiplayerlobby/includes/jsp/header.jsp: String lsdId = "zero";
> ./target/mvn-resources-test/default/multiplayerlobby/includes/jsp/header.jsp: String lsdId = "${lsdId}";
> ./target/mvn-resources-test/default/members/includes/jsp/header.jsp: String lsdId = "zero";
> ./target/mvn-resources-test/default/members/includes/jsp/header.jsp: String lsdId = "${lsdId}";
> ./target/mvn-resources-test/default/client/WEB-INF/classes/global.properties:lsdId=zero
> ./target/mvn-resources-test/default/client/WEB-INF/classes/global.properties:lsdId=${lsdId}
> EXAMPLE3: 2.5 with default delimiters enabled:
> $ mvn clean package -Dresources.version=2.5 -Ddefault.delim=true
> [INFO] Scanning for projects...
> [INFO]
> [INFO] ------------------------------------------------------------------------
> [INFO] Building mvn-resources-test Maven Webapp 1.0-SNAPSHOT
> [INFO] ------------------------------------------------------------------------
> [INFO]
> [INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ mvn-resources-test ---
> [INFO] Deleting /build/merges/matt/maven-resources-test/mvn-resources-test/target
> [INFO]
> [INFO] --- maven-resources-plugin:2.5:copy-resources (copy-webresources) @ mvn-resources-test ---
> [debug] execute contextualize
> [WARNING] File encoding has not been set, using platform encoding ISO-8859-1, i.e. build is platform dependent!
> [WARNING] Using platform encoding (ISO-8859-1 actually) to copy filtered resources, i.e. build is platform dependent!
> [INFO] Copying 7 resources
> [INFO]
> [INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ mvn-resources-test ---
> [debug] execute contextualize
> [WARNING] Using platform encoding (ISO-8859-1 actually) to copy filtered resources, i.e. build is platform dependent!
> [INFO] Copying 0 resource
> [INFO]
> [INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ mvn-resources-test ---
> [INFO] No sources to compile
> [INFO]
> [INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ mvn-resources-test ---
> [debug] execute contextualize
> [WARNING] Using platform encoding (ISO-8859-1 actually) to copy filtered resources, i.e. build is platform dependent!
> [INFO] skip non existing resourceDirectory /build/merges/matt/maven-resources-test/mvn-resources-test/src/test/resources
> [INFO]
> [INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ mvn-resources-test ---
> [INFO] No sources to compile
> [INFO]
> [INFO] --- maven-surefire-plugin:2.7.1:test (default-test) @ mvn-resources-test ---
> [INFO] No tests to run.
> [INFO] Surefire report directory: /build/merges/matt/maven-resources-test/mvn-resources-test/target/surefire-reports
> -------------------------------------------------------
> T E S T S
> -------------------------------------------------------
> There are no tests to run.
> Results :
> Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
> [INFO]
> [INFO] --- maven-war-plugin:2.1.1:war (default-war) @ mvn-resources-test ---
> [INFO] Packaging webapp
> [INFO] Assembling webapp [mvn-resources-test] in [/build/merges/matt/maven-resources-test/mvn-resources-test/target/mvn-resources-test]
> [INFO] Processing war project
> [INFO] Copying webapp resources [/build/merges/matt/maven-resources-test/mvn-resources-test/src/main/webapp]
> [INFO] Webapp assembled in [30 msecs]
> [INFO] Building war: /build/merges/matt/maven-resources-test/mvn-resources-test/target/mvn-resources-test.war
> [INFO] WEB-INF/web.xml already added, skipping
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 2.510s
> [INFO] Finished at: Fri May 27 14:40:31 MDT 2011
> [INFO] Final Memory: 11M/981M
> [INFO] ------------------------------------------------------------------------
> $ grep -H lsdId ./target/mvn-resources-test/default/lobby/includes/jsp/header.jsp \
> ./target/mvn-resources-test/default/client/includes/jsp/header.jsp \
> ./target/mvn-resources-test/default/game/includes/jsp/header.jsp \
> ./target/mvn-resources-test/default/webmasters/includes/jsp/header.jsp \
> ./target/mvn-resources-test/default/multiplayerlobby/includes/jsp/header.jsp \
> ./target/mvn-resources-test/default/members/includes/jsp/header.jsp \
> ./target/mvn-resources-test/default/client/WEB-INF/classes/global.properties
> ./target/mvn-resources-test/default/lobby/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
> ./target/mvn-resources-test/default/lobby/includes/jsp/header.jsp: String lsdId = "zero";
> ./target/mvn-resources-test/default/client/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
> ./target/mvn-resources-test/default/client/includes/jsp/header.jsp: String lsdId = "zero";
> ./target/mvn-resources-test/default/game/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
> ./target/mvn-resources-test/default/game/includes/jsp/header.jsp: String lsdId = "zero";
> ./target/mvn-resources-test/default/webmasters/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
> ./target/mvn-resources-test/default/webmasters/includes/jsp/header.jsp: String lsdId = "zero";
> ./target/mvn-resources-test/default/multiplayerlobby/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
> ./target/mvn-resources-test/default/multiplayerlobby/includes/jsp/header.jsp: String lsdId = "zero";
> ./target/mvn-resources-test/default/members/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
> ./target/mvn-resources-test/default/members/includes/jsp/header.jsp: String lsdId = "zero";
> ./target/mvn-resources-test/default/client/WEB-INF/classes/global.properties:lsdId=<<lsdId>>
> ./target/mvn-resources-test/default/client/WEB-INF/classes/global.properties:lsdId=zero
> EXAMPLE4: 2.5 with default delimiters disabled:
> $ mvn clean package -Dresources.version=2.5 -Ddefault.delim=false [INFO] Scanning for projects...
> [INFO]
> [INFO] ------------------------------------------------------------------------
> [INFO] Building mvn-resources-test Maven Webapp 1.0-SNAPSHOT
> [INFO] ------------------------------------------------------------------------
> [INFO]
> [INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ mvn-resources-test ---
> [INFO] Deleting /build/merges/matt/maven-resources-test/mvn-resources-test/target
> [INFO]
> [INFO] --- maven-resources-plugin:2.5:copy-resources (copy-webresources) @ mvn-resources-test ---
> [debug] execute contextualize
> [WARNING] File encoding has not been set, using platform encoding ISO-8859-1, i.e. build is platform dependent!
> [WARNING] Using platform encoding (ISO-8859-1 actually) to copy filtered resources, i.e. build is platform dependent!
> [INFO] Copying 7 resources
> [INFO]
> [INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ mvn-resources-test ---
> [debug] execute contextualize
> [WARNING] Using platform encoding (ISO-8859-1 actually) to copy filtered resources, i.e. build is platform dependent!
> [INFO] Copying 0 resource
> [INFO]
> [INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ mvn-resources-test ---
> [INFO] No sources to compile
> [INFO]
> [INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ mvn-resources-test ---
> [debug] execute contextualize
> [WARNING] Using platform encoding (ISO-8859-1 actually) to copy filtered resources, i.e. build is platform dependent!
> [INFO] skip non existing resourceDirectory /build/merges/matt/maven-resources-test/mvn-resources-test/src/test/resources
> [INFO]
> [INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ mvn-resources-test ---
> [INFO] No sources to compile
> [INFO]
> [INFO] --- maven-surefire-plugin:2.7.1:test (default-test) @ mvn-resources-test ---
> [INFO] No tests to run.
> [INFO] Surefire report directory: /build/merges/matt/maven-resources-test/mvn-resources-test/target/surefire-reports
> -------------------------------------------------------
> T E S T S
> -------------------------------------------------------
> There are no tests to run.
> Results :
> Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
> [INFO]
> [INFO] --- maven-war-plugin:2.1.1:war (default-war) @ mvn-resources-test ---
> [INFO] Packaging webapp
> [INFO] Assembling webapp [mvn-resources-test] in [/build/merges/matt/maven-resources-test/mvn-resources-test/target/mvn-resources-test]
> [INFO] Processing war project
> [INFO] Copying webapp resources [/build/merges/matt/maven-resources-test/mvn-resources-test/src/main/webapp]
> [INFO] Webapp assembled in [29 msecs]
> [INFO] Building war: /build/merges/matt/maven-resources-test/mvn-resources-test/target/mvn-resources-test.war
> [INFO] WEB-INF/web.xml already added, skipping
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 2.508s
> [INFO] Finished at: Fri May 27 14:41:40 MDT 2011
> [INFO] Final Memory: 11M/981M
> [INFO] ------------------------------------------------------------------------
> $ grep -H lsdId ./target/mvn-resources-test/default/lobby/includes/jsp/header.jsp \
> ./target/mvn-resources-test/default/client/includes/jsp/header.jsp \
> ./target/mvn-resources-test/default/game/includes/jsp/header.jsp \
> ./target/mvn-resources-test/default/webmasters/includes/jsp/header.jsp \
> ./target/mvn-resources-test/default/multiplayerlobby/includes/jsp/header.jsp \
> ./target/mvn-resources-test/default/members/includes/jsp/header.jsp \
> ./target/mvn-resources-test/default/client/WEB-INF/classes/global.properties
> ./target/mvn-resources-test/default/lobby/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
> ./target/mvn-resources-test/default/lobby/includes/jsp/header.jsp: String lsdId = "${lsdId}";
> ./target/mvn-resources-test/default/client/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
> ./target/mvn-resources-test/default/client/includes/jsp/header.jsp: String lsdId = "${lsdId}";
> ./target/mvn-resources-test/default/game/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
> ./target/mvn-resources-test/default/game/includes/jsp/header.jsp: String lsdId = "${lsdId}";
> ./target/mvn-resources-test/default/webmasters/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
> ./target/mvn-resources-test/default/webmasters/includes/jsp/header.jsp: String lsdId = "${lsdId}";
> ./target/mvn-resources-test/default/multiplayerlobby/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
> ./target/mvn-resources-test/default/multiplayerlobby/includes/jsp/header.jsp: String lsdId = "${lsdId}";
> ./target/mvn-resources-test/default/members/includes/jsp/header.jsp: String lsdId = "<<lsdId>>";
> ./target/mvn-resources-test/default/members/includes/jsp/header.jsp: String lsdId = "${lsdId}";
> ./target/mvn-resources-test/default/client/WEB-INF/classes/global.properties:lsdId=<<lsdId>>
> ./target/mvn-resources-test/default/client/WEB-INF/classes/global.properties:lsdId=${lsdId}
> My test project is attached.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira