maven在eclipse上的配置

1,安装maven,配置MAVEN_HOME 和 bin Path环境变量。

2,配置maven setting文件

    <mirror>
      <id>alimirrorId</id>
      <mirrorOf>central</mirrorOf>
      <name>Human Readable Name for this Mirror.</name>
      <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
    </mirror>

这个配置的意思,针对id为central的包优先从url指定地址下载jar包。

<localRepository>D:/Program Files/apache-maven-3.6.0/repository</localRepository>

指定下载得到的jar保存路径。

3. 在eclipse上配置settings.xml 文件。

archetypes里添加“add remote catalog”,公司里无法下载maven模板,需要使用公司镜像下载,在此添加公司的镜像源。

installations里配置如下图

在user settiing里设置

原文地址:https://www.cnblogs.com/dongzhuangdian/p/10165954.html