maven中seetings文件如何配置,以及中央仓库阿里云镜像如何配置

这东西我在网上搜了又捜,配了估计快一天,因为自学很多东西得自己摸清(其实学习步骤还得问大佬),好了,废话少说,如下:

在你的安装目录下conf\settings文件,这个文件是用来配置中央仓库的(我觉得也可以叫做本地仓库),打开,推荐使用

notepad++编辑器,注意这个文件中(网上说的我也没试过,我文件中没有)不能有中文,而且注释中也不能有,保存编码为UTF-8,如图

然后修改settings文件,分别修改settings(定义远程仓库),mirror(添加比如说阿里云镜像),profiles(对应的jdk版本等)标签如图,注意此“/”非此“\”




哈哈,难打吧,复制粘贴就是干,估计眼睛都会看花

 <mirror>
<id>alimaven</id>
<mirrorOf>central</mirrorOf> 
<name>aliyun-maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
</mirror>


<profile> <id>jdk-1.8</id> <activation> <activeByDefault>true</activeByDefault> <jdk>1.8</jdk>
</activation> <properties> <maven.compiler.sourse>1.8</maven.compiler.sourse>
<maven.compiler.target>1.8</maven.compiler.target>

<maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion> </properties> </profile>

远程仓库你得自己建一个settings文件,把conf\settings文件复制然后修改,把  mirror  标签中的东西删除即可


如何在eclipse中配置呢,请看我下篇文章。。。


猜你喜欢

转载自blog.csdn.net/qq_42677055/article/details/81052667