在单个settings.xml文件中包含两个存储库?

时间:2013-07-16 10:12:20

标签: maven build pom.xml

我有以下settings.xml。我有两个pom文件。一个是我的内部项目特有的,另一个是特定的  外部工具。两者都指向单独的存储库。我想使用单个settings.xml,以便查看依赖项  进入两个存储库。问题是当我在外部工具pom上运行构建时,它会查看myProjectSpecificRepository而不是http://URL2/nexus/content/groups/public内部。 (它只考虑在镜像标签下给出的url。我也试过给第二个带有url的镜像标签http://URL2/nexus/content/groups/public,但没有帮助)  我不确定这个问题是什么?

 <mirrors>
    <mirror>
      <id>My Id</id>
      <mirrorOf>*</mirrorOf>
      <url>http://myProjectSpecificRepository/url>
    </mirror>
  </mirrors>


  </profiles>
        <profile>
                <id>project Specific profile</id>
                ......
                <url>http://myProjectSpecificRepository/nexus/content/groups/public</url>
            </profile>

      <profile>
                <id>External profile</id>
                <repositories>
                    <repository>
                        <id>External releases</id>
                        <name>External profile name</name>
                        <url>http://URL2/nexus/content/groups/public</url>
                    </repository>
                </repositories>
                <pluginRepositories>
                    <pluginRepository>
                        <id>External profile plugin </id>
                        <name>External profile description</name>
                        <url>http://URL2/nexus/content/groups/public</url>
                    </pluginRepository>
                </pluginRepositories>
        </profile>

     <activeProfiles>
    <activeProfile>My Id</activeProfile>
    <activeProfile>External profile</activeProfile>
   </activeProfiles>


  </profiles>

0 个答案:

没有答案
相关问题