Search code examples
javatomcatintellij-idea

How to keep WAR files running in Tomcat while I'm using IntelliJ?


There are two WAR files that rarely change and it should be running in my machine.

The tomcat path is /Users/myuser/Downloads/apache-tomcat-9.0.53 and the tomcat server in IntelliJ configuration use it also.

If I deploy the WARs in webapps directory, run another Java project that uses Tomcat in IntelliJ then I can't access these WARs. It seems like these wars are missing but there are in webapp path.

After stop tomcat server in IntelliJ I got these WARs available again.

In order to solve the problem, my current project configuration builds and deploys these WARs every time but it takes more time. How can I solve this?

Tomcat Server
Running
My project [local]
sec-web-services:war exploded [Republish] (first war file that rarely changes)
documents-web-services:war exploded [Republish] (second war file that rarely changes)
api-web-services:war exploded [Republish]
project-webapp:war exploded [Republish]

Tomcat Server Config in IntelliJ

Tomcat Home /Users/myuser/Downloads/apache-tomcat-9.0.53
Tomcat base directory /Users/myuser/Downloads/apache-tomcat-9.0.53

Solution

  • IntelliJ IDEA Tomcat run configuration has an option to deploy applications already present in webapps directory:

    deploy