Hi everybody,
My problem is the following:
I used the filtering resources in maven2 but despite the fact that my filtered properties file variables have been filled with the right texts, the gwt-maven-plugin doesn't take them into consideration when compiling and bcause of that, my applications displays the ${variable} texts and not the values from the property file maven2 filtered. What can I do ? How did you resolve this problem ?
I do not have a concrete solution but I suggest you should try to understand what is happening exactly. Some questions to ask yourself : Is the filtering happening before or after the compilation ? Also, is the plugin working with the filtered resources or the original files ?
From what I observed, the filtering is happening after the compilation and in this case another question arise ? How can I "convince" maven to take care of the filtering before running the maven plugin. Any ideas ?
In Maven you can configure plugins to execute at a specific phase during the Maven execution, using something like that :
<executions>
<execution>
<id>compile</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
Yes but in this case I cannot move the gwt compile execution other that in the compiling goal. I'll have to move the resources filtering action also in the compiling goal. I'll give it a try.
The problem is that, the properties file I am filtering is a gwt messages resources bundle file and from what I saw, maven creates a "generated" folder and puts a generated java file based on the properties file found in the root project sources folder and not in the target folder. After that, it incorporates it in the javascript general file.
This means I have two possibilities:
1) tell the resources plugin to overwrite the properties file located in the sources folder (I am not cool with that because I will certanly have problems on the next subversion update)
2) tell gwt-maven-plugin to seek the properties file in the target/classes folder which I think it is impossible