You can mark the deployment when deploying webapp remotely by specifying the tag attribute. If you are using Maven, you can specify the tag using the tomcat-plugin module . Assuming you already have a plugin setup, you only need to specify a property. Example:
<properties> <maven.tomcat.url>http://example.com:8080/manager</maven.tomcat.url> <tomcat.username>tomcat</tomcat.username> <tomcat.password>tomcat</tomcat.password> <maven.tomcat.tag>mytag</maven.tomcat.tag> <maven.tomcat.path>/myapp</maven.tomcat.path> </properties>
This will create a copy of the war in your manager’s working directory in the directory with the name after your tag (for example, $CATALINA_HOME/work/Catalina/localhost/manager/mytag ). You can restore and reinstall this war through the manager by specifying path and tag :
http://example.com:8080/manager/deploy?path=/myapp&tag=mytag
Note: if the manager’s working directory is ever deleted, your tagged deployments will disappear.
source share