maven 为工件生成错误的下载 url

发布于 2025-01-11 11:51:12 字数 1051 浏览 0 评论 0原文

我们有 Nexus(https://maven.mycompany.com/repository/maven-public/) 存储库。我们已经部署了 jar 快照存储库,

<dependency>
    <groupId>com.mycompany.my-proj</groupId>
    <artifactId>my-app</artifactId>
    <version>1.0-SNAPSHOT</version>
</dependency>

但是使用此依赖项的另一个应用程序无法下载工件。我尝试使用命令行下载依赖项*(maven version 3.8.4)*

mvn org.apache.maven.plugins:maven-dependency-plugin:3.2.0:get -DrepoUrl=https://maven.mycompany.com/repository/maven-public/ -Dartifact=com.mycompany.my-proj:my-app:1.0-SNAPSHOT
-P my-repo

突然我注意到maven构建了错误的下载URL,如下所示 "com." 错过了

Downloading from my-repo: https://maven.mycompany.com/repository/maven-public/mycompany/my-proj/my-app/maven-metadata.xml

然后我使用了引号对于 -Dartifact="com.mycompany.my-proj:my-app:1.0-SNAPSHOT" 在工作并下载之后。我不明白这是什么问题?这个问题在项目的建设中也存在。

We have Nexus(https://maven.mycompany.com/repository/maven-public/) repository. We have deployed jar snapshot repo

<dependency>
    <groupId>com.mycompany.my-proj</groupId>
    <artifactId>my-app</artifactId>
    <version>1.0-SNAPSHOT</version>
</dependency>

But another application that uses this dependency couldn't download artifact. I've tried download dependency with command line*(maven version 3.8.4)*

mvn org.apache.maven.plugins:maven-dependency-plugin:3.2.0:get -DrepoUrl=https://maven.mycompany.com/repository/maven-public/ -Dartifact=com.mycompany.my-proj:my-app:1.0-SNAPSHOT
-P my-repo

Suddenly I've noticed that maven builds the wrong download URL as below that "com." missed

Downloading from my-repo: https://maven.mycompany.com/repository/maven-public/mycompany/my-proj/my-app/maven-metadata.xml

Then I used quotation marks for -Dartifact="com.mycompany.my-proj:my-app:1.0-SNAPSHOT" after that worked and downloaded. I didn't understand what is the problem? This problem also exists in the building of the project.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文