Reputation: 902
We are working on Liferay platform, which uses Tomcat servlet. We have deployed modules, which consist another our compiled jars. Now, we wrote simple program, that monitor our resources and replace them in webapps folder if changes detected. This works fine, but when we are trying to replace sources in compiled jars (js, html etc), then Tomcat detect changes and start redeploy.
Is there any way to replace resources in compiled jars without affecting Tomcat redeploy automatically? Our Tomcat redeploys take a lot of time, and we want to redeploy resources only on demand.
Upvotes: 0
Views: 118
Reputation: 39241
You can disable autodeployment setting Host autoDeploy
attribute to false. Then you can use startup scripts, tomcat manager or REST api to redeploy.
<Host autoDeploy="false"
See https://tomcat.apache.org/tomcat-7.0-doc/deployer-howto.html#Deploying_on_a_running_Tomcat_server
You can consider also to deploy on demand using the tomcat API and providing a war. There is an Ant task available. See this example
Upvotes: 2