0

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?

Vortilion
  • 406
  • 2
  • 6
  • 24
  • What are the Run/Debug Configuration types are those? What actions do you have in 'Before launch' section for both configurations? – Andrey Sep 20 '18 at 13:37
  • The Maven-Run-Config is just a basic Maven Run Config which calls "clean install", it has nothing in the "Before launch"-area. The Tomcat-Run-Config has just the exploded artefact, I didn't change any of the other settings except "On Update action" and "On frame deactivation". In the "Before launch"-area it has "Build" and "Build 'web:war exploded' artefact", which is the default setting. – Vortilion Sep 21 '18 at 06:03
  • `In the "Before launch"-area it has "Build" and "Build 'web:war exploded' artefact", which is the default setting.` Try to remove "Build" step in Before launch section and build only by Maven configuration. If issue remains please report it with a minimal sample project at https://youtrack.jetbrains.com/issues/IDEA – Andrey Sep 21 '18 at 11:26

0 Answers0