I want to create one maven profile that will search web.xml in all project that will used it and replace necessary values in web.xml. I do not want to insert maven properties in web.xml, but just create one profile for all projects that contains web.xml. For example I want replace javax.faces.PROJECT_STAGE value:
<context-param>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Production</param-value>
</context-param>
to
<context-param>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Development</param-value>
</context-param>
I want to create one profile that will search web.xml and do necessary replaces, but without modification original web.xml to:
<context-param>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>${maven.property}</param-value>
</context-param>
Is that possible with maven?
It would be better use maven itself https://community.jboss.org/wiki/HowToConfigureJavaEEApplicationToApplyDifferentSettingsinWebxmlEtcForVariousEnvironmentsByMaven
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With