1.外部maven settings配置,将源设置为阿里云
设置属性localRepository,activeProfiles与profiles下的配置,其他默认
D:\Program Files\apache-maven-3.3.1\conf\settings.xml
<localRepository>D:/Program Files/apache-maven-3.3.1/repo</localRepository>
<activeProfiles>
<!--make the profile active all the time -->
<activeProfile>securecentral</activeProfile>
</activeProfiles>
<profiles>
<profile>
<id>securecentral</id>
<!--Override the repository (and pluginRepository) "central" from the
Maven Super POM -->
<repositories>
<repository>
<id>central</id>
<!--<url>http://repo1.maven.org/maven2</url> -->
<url>http://maven.aliyun.com/nexus/content/groups/public</url>
<releases>
<enabled>true</enabled>
</releases>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>central</id>
<!--<url>http://repo1.maven.org/maven2</url> -->
<url>http://maven.aliyun.com/nexus/content/groups/public</url>
<releases>
<enabled>true</enabled>
</releases>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
2.eclipse maven配置
windows->Preferences->maven->user setttings
用户根据自己本地路径配置
eclipse preferences maven user settings
猜你喜欢
转载自newjava-sina-cn.iteye.com/blog/2358139
今日推荐
周排行