Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.2
-
Fix Version/s: 2.1.0-1
-
Labels:None
-
Number of attachments :
Description
About
When applying maven resource filtering (http://maven.apache.org/plugins/maven-resources-plugin/examples/filter.html) only partial support is encountered.
Example:
My 'com.acme.gwtproject.GwtProject' uses the standard gwt-maven directory layout, consequently my html is located at...
./src/main/resources/com/acme/gwtproject/public/GwtProject.html
If GwtProject.html contains a token say $
{project.version} I want to see this in the released artifacts, released sources artifacts and in dev mode. But the build lifecycle only seems to filter/replace one copy of the file, that strangely end's up @ ./war/WEB-INF/classes/GwtProject.html <--- weird location!NOTE: I don't believe that this has anything todo with the bug, but my project is <packaging>jar</packaging>
h1. Reproduce
To reproduce this, and the following to a pom.
<build> ... <resources> <resource> <directory>src/main/java</directory> </resource> <resource> <directory>src/main/resources</directory> <filtering>true</filtering> </resource> </resources> ... <build>
Then add a token to your project's html file...
${project.version}
Try 'gwt:run', look at the html source and see it has not been filtered.
Also try 'install' to build the war/jar and take a look at it's contents, the html file would not have been filtered within these artifacts.
Issue Links
- is duplicated by
-
MGWT-222
Maven resource filtering should work for resources used by the GWT plugin
-
The same applies to property expansion in a GWT module descriptor (MyApp.gwt.xml). It looks to me like the original, unfiltered directory "src/main/resources" is added to the GWT compiler's classpath ahead of "target/classes". So even if the Resources plugin has done the filtering, GWT ignores it.