我的Maven2 Cheat Sheet

这一部分抄自  
https://wiki.doit.wisc.edu/confluence/display/atjava/Maven+2+Cheat+Sheet

To create a standard Java project:

mvn archetype:create -DgroupId=<group-id> -DartifactId=<artifact-id>

To create a Web application:

mvn archetype:generate \

-DgroupId=player.kent.chen \

-DartifactId=PlayJboss \

-Dversion=1.0-SNAPSHOT \

-DarchetypeGroupId=org.apache.maven.archetypes \

-DarchetypeArtifactId=maven-archetype-webapp \

-Dpackaging=war

Turn a Maven project directory into an Eclipse workspace:

mvn -Declipse.workspace=/Users/mgs/Desktop/Eclipse/workspace eclipse:add-maven-repo

mvn eclipse:eclipse

Leave a Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.