Maven中setting修改成阿里的數據源

修改maven中setting配置tomcat

找到tomcat中conf下的setting.xml,找到<mirrors>下maven

  <mirror>
      <id>mirrorId</id>
      <mirrorOf>repositoryId</mirrorOf>
      <name>Human Readable Name for this Mirror.</name>
      <url>http://my.repository.com/repo/path</url>;
    </mirror>ide

  <mirror>
            <id>nexus-aliyun</id>
            <mirrorOf>*</mirrorOf>
            <name>Nexus aliyun</name>
            <url>http://maven.aliyun.com/nexus/content/groups/public</url>;
    </mirror>
以下:
Maven中setting修改成阿里的數據源
而後,添加pom中配置
<repositories>
<repository>
<id>sonatype-nexus-snapshots</id>
<name>Sonatype Nexus Snapshots</name>
<url>http://maven.aliyun.com/nexus/content/groups/public</url>;
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
保存退出,maven從新加載便可。this

相關文章
相關標籤/搜索