I'm working with a Maven Webproject and Intellij IDEA (2018.2). The web.xml is being filtered by Maven (it contains two placeholders which are being filled through Maven Resource filtering, e.g.
<session-timeout>${application.session.timeout}</session-timeout>
).
My problem now is: I got two run-configurations, one which builds the project via maven and the other which deploys the application as an exploded artefact to my local Tomcat (v8.5). If I build it, the web.xml gets processed correctly and the placeholders are being switched with the values, which I can check in the exploded artefact folder under /target. But when I run the deploy-run-config, the web.xml is being overwritten by the one in my src/main/resources folder. This is standard behaviour I think, but what can I do now in my situation? The web.xml needs to be processed by maven, otherwise it doesn't work, but the deploy-config always overwrites it... Is it so uncommon to use filtering for the web.xml?