1

我有自己的组织内部存储库,在全局 setting.xml 中配置如下:

   <mirror>             
            <id>nexus-public-snapshots</id>
            <mirrorOf>public-snapshots</mirrorOf>
            <url>http://nexus.tk.com/content/groups/public-snapshots</url>
        </mirror>
        <mirror>
            <id>nexus</id>
            <mirrorOf>*</mirrorOf>
            <url>http://nexus.tk.com/content/groups/public</url>
        </mirror>
    </mirrors>

是否可以将镜像详细信息作为存储库移动到父 pom 文件?所以我们不需要更改每个开发人员和 CI 服务器的默认 setting.xml。

我在项目父 pom.xml 中配置存储库如下,但无法构建项目。甚至公司内部 repo maven 中可用的所需 jar 文件试图从中央下载 jar 并报告错误could not find artifact

<repositories>
    <repository>
        <id>nexus</id>
        <name>Sonatype's Maven repository</name>
        <url>http://nexus.tk.com/content/groups/public</url>
    </repository>
</repositories>
4

0 回答 0