idea中,通过deploy向远程私有仓库部署jar包,配置如下,为啥releases跟snapshots仓库都有了?

版本号里有SNAPSHOT,不是应该上传到SNAPSHOT吗?

    <parent>
        <groupId>com.abc.ekm</groupId>
        <artifactId>abc</artifactId>
        <version>1.0.0-SNAPSHOT</version>
    </parent>
。。。。。。。
    <distributionManagement>
        <repository>
            <id>x-repo</id>
            <url>http://x-repo.abc.net/repository/maven-releases/</url>
        </repository>
        <snapshotRepository>
            <id>x-repo</id>
            <url>http://x-repo.abc.net/repository/maven-snapshots/</url>
        </snapshotRepository>
    </distributionManagement>
阅读 2k
1 个回答

将 id 改成不一样的。

x-repo-releasex-repo-snapshots

maven 通过 id 管理 repository,通过 snapshots 仓库的 id 同样也找到了 release 仓库的,因此被同时发布了。

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题