Question

Something of a maven noob, I'm trying to understand the difference between

tomcat:run-war

and

tomcat:run-war-only

The Apache documentation mean very little to someone unfamiliar with the environment:

tomcat7:run-war Runs the current project as a packaged web application using an embedded Tomcat server.
tomcat7:run-war-only Runs the current project as a packaged web application using an embedded Tomcat server without forking the package cycle.

What is the difference in layman's terms?

Was it helpful?

Solution

tomcat7:run-war-only target will run the tomcat in the same process (shell). If you terminate the shell, the tomcat will die and the webapp is not available anymore

tomcat7:run-war will launch the war in 'background'. Maven will finish the job and you'll be able to reuse the shell. Webapp will still be available

OTHER TIPS

tomcat7:run-war run the lifecycle to package your war then run this war in an embeded tomcat

tomcat7:run-war-only won't build your war. Try mvn clean then mvn tomcat7:run-war-only and you will see the difference.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top