Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

question on mvn -e clean install

Tags:

maven-2

maven

In maven, what does "-e" stands for in the following command.

mvn -e clean install

Moreover, what is the difference between

mvn clean install  

and

mvn clean compile
like image 657
bit-question Avatar asked May 17 '11 15:05

bit-question


2 Answers

As Satish stated, the "-e" switch will display execution errors in the maven output.

As to the difference in "install" vs "compile", those are different Maven lifecycle stages. See the Introduction to the Build Lifecycle documentation for help with that. The key to remember is that Maven will execute all lifecycle stages up to and including the one you specify, and then stop.

Specifically in your case, "mvn clean compile" will run Maven with two lifecycle targets, the first being "clean", and the second being "compile". The "compile" lifecycle phase will run the build up to and including the compilation of project source code. The "install" lifecycle phase will run all the way through packaging your project into it's container (jar, war, etc) and will install it to your local maven repository, which resides on your local machine. When a project is installed to your local repository, other projects you build on your machine can reference it without having to have any knowledge of where the source code or project build artifacts actually reside.

like image 92
DuckPuppy Avatar answered Sep 30 '22 15:09

DuckPuppy


the e flag (e = errors) prints out more detailed error messages. mvn clean install, does compilation, linking and installs (copies to app server etc)

for more maven options look at this ref card http://www.scribd.com/doc/15778516/DZone-Refcard-55-Apache-Maven-2

or maven command list http://cvs.peopleware.be/training/maven/maven2/mvnCommand.html

like image 23
Satish Avatar answered Sep 30 '22 14:09

Satish