wraphwa.blogg.se

Maven web app
Maven web app






maven web app

However, if your web.xml is complex and you pose a greater risk of 4-5 copies of the web.xml getting out of sync, this may be an approach that will work for you. It's ugly, and the xml is hard to modify in this form.

MyRealmīecause non-existent properties evaluate to an empty string, your configurations which do not have this property set (or the property is an empty xml tag) will evaluate to a blank line here. Then, you have a single web.xml file with the following: $

When you want to exclude all of the security, you define them as follows: keeps everything in one web.xml while still making both it and the pom.xml readable.

maven web app

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

maven web app

Ī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?








Maven web app