如何将依赖项添加到我的私有 Maven 存储库中的 jar 中?
我有一个私有的 nexus 存储库,比如:https://localhost/repository/my-team/
在一个项目中,我生成、编译并将一些 java 类打包到一个 jar 中。说,my.jar。然后我将它作为 jar 上传到 nexus:
curl --upload-file my.jar \
"https://localhost/repository/my-team/com/example/artifact/my.jar"
在另一个项目中,我想将此 jar 称为依赖项:
<repositories>
<repository>
<id>nexus</id>
<url>https://localhost/repository/my-team/</url>
</repository>
</repositories>
在这种情况下如何添加依赖项?我在哪里指定该 jar 文件的 url?
撒科打诨
相关分类