没有网络的idea就像被砍掉了双手,原来被忽略的小细节现在都要自己去配置,害~不过配置好了以后就差不多能用吧
File>Settings>Maven
确认红框信息:
1.为自行安装的maven地址
2.为仓库配置文件,在这里配置本地仓库和远程仓库地址(公司内部的仓库地址)
3.为本地仓库地址
setting.xml文件(不用复制粘贴我这份,最好修改自己电脑上的相应文件的仓库地址url即可)
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<!-- Maven 本地仓库地址,如果不配置,默认是.m2/repository -->
<localRepository>D:\software\.m2</localRepository>
<mirrors>
<!-- 中央仓库镜像地址配置 -->
<mirror>
<id>central_mirror</id>
<mirrorOf>central</mirrorOf>
<!-- 仓库地址 -->
<url>http://192......</url>
</mirror>
</mirrors>
<profiles>
<profile>
<id>downloadSources</id>
<properties>
<downloadSources>true</downloadSources>
</properties>
</profile>
<profile>
<id>nexus</id>
<!-- jar包仓库地址 -->
<repositories>
<repository>
<id>central</id>
<url>http://central ....</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<!-- 插件仓库地址 -->
<pluginRepositories>
<pluginRepository>
<id>central</id>
<url>http://central....</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>nexus</activeProfile>
<activeProfile>downloadSources</activeProfile>
</activeProfiles>
</settings>