MAVEN installation uses
Environment Preparation:
JDK1.6
Maven 3.0.4
mveclipse8.6.1 (Integrated Mveclipse)
Before installing MAVEN, you need to make sure that the JDK is installed and that MAVEN is a project under Apache.
Download mavenhttp://www.apache.org/dyn/closer.cgi/maven/binaries/apache-maven-3.0.4-bin.tar.gz website
Unzip or rename after download is complete
To configure the MAVEN environment variable:
System variable: maven_home = D:\server\maven
User variable: path =%maven_home%\bin
Open cmd, input: mvn-version
MVN is a MAVEN directive, mvn-version is to view the version information, if you can print out the version information, the computer has been installed successfully.
To modify the location of the MAVEN repository:
Locate the Settings.xml configuration file under maven under Conf, which is under the current user's. M2 under the repository directory
Modified to <localRepository>D:\Repositorys\maven</localRepository>
Input in cmd and enter to execute: MVN help:system
Then maven downloads a whole bunch of things from the remote repository, which will have to be downloaded sooner or later.
Maven Configuration to MyEclipse:
Turn on Myeclipse,window-Preferences--and MyEclipse--maven4myeclipse-up Maven
Installations remove the default, add the maven you just installed
User Settings Set the directory for MAVEN's settings.xml configuration file
Maven Command set:
To create a common Java project for maven:
MVN archetype:create
-dgroupid=packagename
-dartifactid=projectname
To create a MAVEN Web project:
MVN archetype:create
-dgroupid=packagename
-dartifactid=webappname
-darchetypeartifactid=mvaen-archetype-webapp
Compiling source code: MVN Compile
Compile test code: MVN test-compile
Run Test: MVN test
Generate SITE:MVN Site
Packaging: MVN Package
Installing JAR:MVN install in the local repository
Clear the resulting project: MVN clean
Build Eclipse Project: MVN eclipse:eclipse
Production idea Project: MVN Idea:idea
Combining goal commands, such as package-only not tested: Mvn-dtest packages
Content of the compilation test: MVN test-compile
Only hit jar package: MVN Jar:jar
Test only without compiling, or test compilation: MVN test-skipping compile-skipping Test-compile
Clear some system settings for Eclipse: mvn Eclipse:clean
Source file for download package: MVN dependency:sources
Common commands:
MVN Package
MVN Eclipse:eclipse
MVN Compile
MVN Jar:jar
MVN clean
Storm record--7--maven installation uses