![]() When you want to exclude all of the security, you define them as follows: When you want security, you leave them empty, like this: Within the profiles, include two properties. In the pom.xml, define two profiles (or however many you need). In my case, I had a need to sometimes have security and sometimes have no security, depending on the environment. It keeps everything in one web.xml while still making both it and the pom.xml readable. There's a third, compromise option which I implemented in my project. ![]() Or to be even simpler, in the main of your POM, use a property to refer to the webXml attribute and then just change it's value in different profiles Īs an alternative to having to specify the maven-war-plugin configuration in each profile, you can supply a default configuration in the main section of the POM and then just override it for specific profiles. Yes, within each profile you can add a configuration of the maven-war-plugin and configure each to point at a different web.xml. Is there a way to have two web.xml files and select the appropriate one depending on the profile?
0 Comments
Leave a Reply. |