Download a .maven
Download maven , has been updated to version 3.6.3, maven3.3 should be noted that from the beginning, jdk must be 1.7 or later.
Click the image above the red link to download to a local decompression, the directory below, the current version of Maven bloggers used is apache-maven-3.0.5 version.
repository.zip local Maven repository is located, which includes six years of web development bloggers most commonly jar package, very full.
II. Configuring maven repository
1. Local warehouse
offline and no internet, bloggers local warehouse 20 G, jar package contains all six years the project frequently used because of too much, network disk can not upload, if necessary can stay under mailbox.
//仓库的路径
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<localRepository>D:\java\maven\repository</localRepository>
</settings>
2. remote repository
Maven repository in foreign and domestic use will be very slow, especially download jar, we can replace domestic aliyun warehouse.
You can increase download speed.
Conf maven modify the root file folder of the file setting.xml, mirrors on the node, add the following:
<mirror>
<id>nexus-aliyun</id>
<mirrorOf>central</mirrorOf>
<name>Nexus aliyun</name>
<url>http://maven.aliyun.com/nexus/content/groups/public</url>
</mirror>
Three .maven environment variable configuration
Right My Computer, click Properties, and then pop the figure below, click on the left side of the Advanced System Settings, then click Environment Variables
New system variable, the variable name: MAVEN_HOME, variable value: is the path where your native apache-maven-3.0.5, as shown below, click OK to save the variable.
Then find the variables in the system variable named: Path system variable, click the New button to add the variable value:% MAVEN_HOME% \ bin, as shown below, click OK to save the variable.
Once configured, the command line window, enter: mvn -v, to verify that the configuration is successful, the success of the configuration as shown below:
Four .idea configuration maven
Open idea, click on the top File, and then click Settings
In the following setup, the selection list is the first box maven, the second box is selected settings.xml configuration file, then save.
On this idea maven and configurations are completed.