Download maven - Configuration

Premise: maven installation you first need to install jdk

A: maven Download

 

Baidu search into the maven maven official website

Click on the red box to download

After downloading extract the directory analysis

  bin folder: contains script to run mvn

  boot folder: class loader frame comprising

  conf folder: Contains settings.xml configuration file

  lib folder: Contains maven java runtime library needed

 

 Two: maven configuration

 

First, make sure the computer can be used to install the jdk java -version Verify dos window

Right configuration environment variable My Computer - Properties, select Advanced System Settings

Select Environment Variables

Click the New button under System Variables

MAVEN_HOME variable variable name value of the path to the selected decompression

After selecting the system variables path click Edit

After determining Click the New button input% MAVEN_HOME% \ bin in the pop-up window

At this time, WINDOWS + R keys, enter cmd, enter the command-line interface, input: mvn -v is installed as shown in FIG If a configuration error.

After determining the need to configure the environment variables again after clicking new variable name MAVEN_OPTS variable values ​​in the system variables -Xms128m -Xmx512m

(MAVEN_OPTS usually need to set the value of -Xms128m -Xmx512m, because the default Java maximum memory available often can not meet the needs of Maven to run, such as when a larger project that uses Maven to build the project site would take a lot of memory, if not the configuration is very easy to get java.lang.OutOfMemeoryError.)

At this point re-open again WINDOWS + R keys, enter cmd, enter the command-line interface, input: mvn -v if it is installed as shown in FIG configured correctly.

 

 

Guess you like

Origin www.cnblogs.com/flyinghome/p/12128393.html