1. Download maven:
1. Maven official website: http://maven.apache.org/download.cgi
2. Installation and configuration
1. After downloading, unzip it to the local directory, as shown in the picture
2. Configure environment variables: My computer right click -》Properties -》Advanced system settings -》Environment variables
Create a new variable named MAVEN_HOME in the system variable, MAVEN_HOME=D:/Java/apache-maven-3.5.2
However, add %MAVEN_HOME%/bin to the path;
Configuration is complete.
Open cmd and click: mvn -version
If you can print the above information, it means that Maven has been installed on your computer.
mvn is a command of maven, mvn -version is to view version information
3. Configure the dependency package storage path for maven download.
Open the file: D:/Java/apache-maven-3.5.2/conf/settings.xml
Set localRepository as shown in the following code: (the address can be customized)
<localRepository>D:/Java/article</localRepository>
Indicates that if localRepository is not set, maven will build the local repository into /.m2/repository folder by default.
I personally recommend not to use the default warehouse address, specifying the warehouse address to other drive letters, which is more convenient for management.
3. Configure maven in IDEA
Open -File->Settings->Build,Execution,Deployment->Build Tools->Maven, the configuration steps are shown in the figure
At this point, the maven installation configuration and configuration in Idea have also been introduced. If there is any error in writing, please correct me. Thank you.
The above graphic and text tutorial on maven installation and configuration in IDEA is all the content I have shared with you. I hope you can give you a reference and I hope you can support Wulin.com more.