www.zhblog.net

Maven下载及配置安装

Maven官网资源和详细,照着做就行。

1.Maven下载地址:https://maven.apache.org/download.cgi

2.Maven使用:https://maven.apache.org/users/index.html


安装

将下载下来的zip包解压出来,添加apache-maven-3.6.3\bin目录到PATH环境变量中。

添加完成后检验:

mvn -v


应有如下输出:

Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)

Maven home: D:\apache-maven-3.6.3\bin\..

Java version: 1.8.0_202, vendor: Oracle Corporation, runtime: D:\software\Java\jdk1.8.0_202\jre

Default locale: zh_CN, platform encoding: GBK

OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"


配置

修改本地仓库地址

<localRepository>D:\apache-maven-3.6.3\repo</localRepository>


IDEA整合

在代码编辑器中配置Maven

批注 2020-09-03 234154.png


Maven教程

https://www.zhblog.net/go/java/tutorial/maven-first-hello-world?t=632

https://www.zhblog.net/go/java/tutorial/maven-build-fat-jar?t=633

https://www.zhblog.net/go/java/tutorial/maven-common-commands?t=636

https://www.zhblog.net/go/java/tutorial/maven-java-compiler-version?t=637



 

展开阅读全文

评论

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 心情