----------------------------------------------------------------------------------------------------------------------------------
Start up steps:
Step 1) download maven from http://maven.apache.org onto your local drive
Step 2) setup environment variable M2_HOME=C:\apache-maven-2.0.9
Step 3) update environment varialbe path=%path%;%M2_HOME%\bin
Step 4) enter dos cmd
Step 5) go to some newly-created folder. issue command "mvn--version" to check maven version
Step 6) issue command "mvn archetype:create -DgroupId=com.mycompany.app -DartifactId=my-app" to create a new sample project
----------------------------------------------------------------------------------------------------------------------------------
Command list:
For some of them, to issue a command, you need to first go to any folder which contains pom.xml.
creat sample application: mvn archetype:create -DgroupId=com.mycompany.app -DartifactId=my-app
build using maven: mvn package
check maven verion: mvn --version
create project site: mvn site
----------------------------------------------------------------------------------------------------------------------------------
About phase:
Phase is a sequence list. The sequence list is:
validate, compile, test, package, integration-test, verify, install, deploy
if you issue: mvn validate, it will run mvn validate
if you issue: mvn compile, it will run mvn validate, and then, mvn compile
if you issue: mvn deploy, it will run all of them, in sequence.
Except the above sequence, there are another 2 : clean and site.
----------------------------------------------------------------------------------------------------------------------------------
Usful site:
Maven in 5 minutes: http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html
Maven getting started Guide: http://maven.apache.org/guides/getting-started/index.html
----------------------------------------------------------------------------------------------------------------------------------