- Install Maven
install jdk
Unzip apache-maven-2.2.1-bin.zip
Configure environment variable M2_HOME
Add $M2_HOME/bin to path
test mvn -V
- Create project
mvn archetype:create -DgroupId=com.oreilly -DartifactId=my-app
mvn archetype:create -DgroupId=com.oreilly -DartifactId=my-app -DarchetypeArtifactId=maven-archetype-webapp
- other
mvn package generates target directory, compiles and tests code, generates test report, and generates jar/war file
mvn jetty:run run the project on jetty ,
mvn compile compile
mvn test compile and test
mvn clean to empty the generated files
mvn site generates a website for project-related information
Mvn eclipse:clean clears the configuration information of the Eclipse project (Web project )
mvn eclipse:eclipse converts the project into an Eclipse project