The time taken for a webapp to be packaged into a war, deploy and then have it unpackaged in tomcat container can be reduced. Simply have the exploded war deployed. This could save time for developer!!
Steps to make exploded war deployment:
1. add this under pom.xml >> plugins
org.codehaus.mojo
tomcat-maven-plugin
1.0-beta-1
admin
admin
<url>
2. mvn war:exploded tomcat:undeploy tomcat:exploded
--This keeps the war exploded, undeploys the webapp context and copies over the exploded build to tomcat using the tomcat manager.
Also a better option to deploy to different servers and also generating the war ( instead of configuration above):
mvn clean install -Dmaven.test.skip=true war:exploded tomcat:undeploy tomcat:exploded -Dmaven.tomcat.url=http://localhost:8080/manager -Dtomcat.password=admin -Dtomcat.username=admin
Refer for more http://mojo.codehaus.org/tomcat-maven-plugin/exploded-mojo.html

Steps to make exploded war deployment:
1. add this under pom.xml >> plugins
<url>
http://localhost:8080/manager2. mvn war:exploded tomcat:undeploy tomcat:exploded
--This keeps the war exploded, undeploys the webapp context and copies over the exploded build to tomcat using the tomcat manager.
Also a better option to deploy to different servers and also generating the war ( instead of configuration above):
mvn clean install -Dmaven.test.skip=true war:exploded tomcat:undeploy tomcat:exploded -Dmaven.tomcat.url=http://localhost:8080/manager -Dtomcat.password=admin -Dtomcat.username=admin
0 comments:
Post a Comment