如果您有服务器存储库,mvn如何工作?

时间:2018-01-10 11:09:37

标签: maven

我在settinngs.xml中添加了3个存储库 当我 朗姆酒mvn clean install 从哪里mvn喜欢依赖 它是从存储库(buil1,buil2,buil3)还是从公共关系看? nexus的顺序是什么?

<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">

  <profiles>
    <profile>
      <id>build</id>
      <repositories>
        <repository>
          <id>build1</id>
          <url>url1....</url>
        </repository>
           <repository>
          <id>build2</id>
          <url>url2....</url>
        </repository>
                <repository>
          <id>build3</id>
          <url>url3....</url>
        </repository>
      </repositories>
    </profile>
  </profiles>
  <activeProfiles>
    <activeProfile>build</activeProfile>
  </activeProfiles>
</settings>

1 个答案:

答案 0 :(得分:1)

看看

How to set order of repositories in Maven settings.xml

Maven repository lookup order

修复Maven Bug (MNG-4400)后,工件以定义的存储库顺序解析。