Tuesday, December 29, 2015

Maven tips


build a new maven project:
mvn archetype:generate -DgroupId=com.mycompany.helloworld -DartifactId=helloworld -Dpackage=com.mycompany.helloworld -Dversion=1.0-SNAPSHOT

cd helloworld
mvn package

java -cp target/helloworld-1.0-SNAPSHOT.jar com.mycompany.helloworl

help to get more information
mvn help:effective-pom

clean the target folder
mvn clean 

mvn compile
mvn test
mvn install

No comments:

Post a Comment