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?
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
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With