I am new to Java and Springsource tool suite.
Currently, I am running the following commands one after the other to deploy the project in tomcat.
- mvn clean package
- mvn tomcat:run
In SpringSource tool suite, I use Run as -> maven Build and first using the goal as clean package. Then I again use Run as -> maven Build with goal as tomcat:run.
Can these two command be done in a single execution?
I was told that Linux allows such a process as mvn clean package;mvn tomcat:run
Is there any way to replicate this in Windows?
Every time I try this in windows I get the message showing that the program has started a thread that cannot be stopped.
As said before, you can invoke a Maven command with several actions on the same line.
Generally, you invoke Maven with some phases like in
mvn clean install site.The phases belong to a lifecycle (Clean, Default or Site).
You can also add some goals invocations in addition to the phases. They will be be executed in sequence.
Like in
mvn clean dependency:copy-dependencies package(Running Maven Tools).The execution time will be optimized if you execute all of your tasks in one command rather than with severals invocations.