1
votes

I have a web project that is built with maven. I have the project in eclipse as a WTP project (generated using mvn eclipse:eclipse), and it is associated with a glassfish server, also configured in eclipse. I can publish to the server. The problem is, we use maven to do some filtering in one of the configuration xml files in the webapp (faces-config.xml) so it replaces properties within the xml file with properties from maven's pom.

I am not averse to re-defining those properties in eclipse if I have to since there is only one or two, and they haven't changed in a while, but hard coding the value in faces-config.xml is not an option because it is also included in another project with different values, thus the need for filtering.

Is there a way for me to customize the publish step of the WTP within eclipse so that it performs that filtering before pushing the changes to the deploy directory?

1

1 Answers

1
votes

If you are not using the m2eclipse plugin, there might be a solution described in Getting Maven and Eclipse to work together to filter resources. I'm not sure it will work with the WTP but worth the read!