Maven project build tool

project build tool

  • Maven: is a more traditional project construction tool
  • Ant : An earlier project build tool
  • Grade : At present, the relatively mainstream project construction tool has the potential to replace maven, but it is currently mostly used for Android in enterprises. Many Java open source projects and frameworks have been migrated to Grade

What can Maven do? ? ?

Can better manage projects, build projects
and manage third-party jars required by java

Use Maven

  • Download maven (https://maven.apache.org/download.cgi)
  • Unzip maven to the D:/Program Files directory
  • Configure the maven installation path to the environment variable
M2_HOME = D:\Program Files\apache-maven-3.8.5

PATH = %M2_HOME%\bin
  • Verify that maven is installed successfully
mvn -version
  • Modify maven configuration file D:\Program Files\apache-maven-3.8.5\conf\settings.xml
<localRepository>D:/.m2/repository</localRepository>

<mirror>
  <id>alibaba</id>
  <mirrorOf>central</mirrorOf>
  <name>alibaba repository</name>
  <url>https://maven.aliyun.com/repository/public</url>
</mirror>
  • Integrate maven and idea development software
File -> new Project Setup -> Settings new Project -> Build -> Build Tools -> Maven 

It is recommended to configure the corresponding maven in File -> settings

Guess you like

Origin blog.csdn.net/weixin_52953038/article/details/127332855