maven Project automatically loads jar packs
The required tools are as follows: IntelliJ idea 13.1; Download Address: Please own Baidu search maven3.5, here is best to use apache-maven-3.2.1; Download Address link: http://maven.apache.org/download.cgi owns a maven project by default; The default is to install the JDK and configure the environment variables; because MAVEN relies on the Java Runtime environment, you need to configure the Java Runtime Environment before using MAVEN. Download and install the JDK, configure the JDK environment variable java_home, otherwise maven will not be available (maven3.5 corresponding JDK version is jdk1.7 and above)
Step One: Install Maven: Extract the apache-maven-3.5.0 compressed package into the directory for example: D:\OC\Maven\apache-maven-3.5.0
Step Two: Configure MAVEN's environment variables:
1. In My Computer-> properties-> environment variable-> system variable create a new m2_home variable with the variable value (installation path) D:\OC\Maven\apache-maven-3.5.0
Step three: Create a local Maven repository: Manually create an empty file, such as: Localwarehouse, in D:\OC\Maven\LocalWarehouse this position,
Then open the Conf->settings.xml in Maven, like D:\OC\Maven\apache-maven-3.5.0\. conf under the Settings.xml file, find Localrepository, add the following code to the file:
The effect is as follows:
To verify that MAVEN was successfully configured: Enter mvn-version on the command line
Step Fourth: Configure Maven in IntelliJ idea:
Open-file-settings
(1) Maven folder directory, automatic search to
(2) Select Override and select the Maven folder below Settings.xml
(3) Maven local warehouse, also automatic search to
At this point, the basic configuration of Maven in IntelliJ idea has been completed
Fifth step: Configure IntelliJ idea to automatically download jar packages
Configure idea maven to automatically download the source code:
Click on the file-> Setting->maven->importing: Select two multiple marquee automatically and download in sources documentation
Sixth step: Right key maven project, Maven->reimport, can download jar package automatically, download jar package in local warehouse D:\OC\Maven\LocalWarehouse