我有以下settings.xml。我有两个 pom 文件。一个特定于我的内部项目,另一个特定于外部工具。两者都指向单独的存储库。我想使用单个 settings.xml 以便在两个存储库中查看依赖项。问题是当我在外部工具 pom 上运行构建时,它会查看 myProjectSpecificRepository 但不是 inside 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>