使用 maven 的部署:部署文件插件部署工件、其源代码和 javadoc
我在尝试将工件、其源代码及其 javadoc 部署到我们的 Maven 存储库 (Nexus) 时遇到了困难。源和javadoc参数似乎被忽略,实际上只上传-Dfile中指定的主jar。
有谁知道出了什么问题吗?这是我的命令(我正在尝试将 Whack 放入我们的本地存储库)
mvn deploy:deploy-file -Dfile=whack-1.0.0.jar \
-Dsources=whack-1.0.0-sources.jar \
-Djavadoc=whack-1.0.0-javadoc.jar \
-DgroupId=org.igniterealtime \
-DartifactId=whack \
-Dversion=1.0.0 \
-Dpackaging=jar \
-Durl=https://myhost.com/nexus/content/repositories/thirdparty/
I'm stumped trying to deploy an artifact, its sources and its javadoc to our maven repository (Nexus). The sources and javadoc parameters seems to be ignored, and only the main jar specified in -Dfile is actually uploaded.
Does anyone know what's wrong? Here's my command (I'm trying to put Whack into our local repository)
mvn deploy:deploy-file -Dfile=whack-1.0.0.jar \
-Dsources=whack-1.0.0-sources.jar \
-Djavadoc=whack-1.0.0-javadoc.jar \
-DgroupId=org.igniterealtime \
-DartifactId=whack \
-Dversion=1.0.0 \
-Dpackaging=jar \
-Durl=https://myhost.com/nexus/content/repositories/thirdparty/
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
首先检查您使用的插件版本是否为 2.7。根据文档选项
sources
和 javadoc 从此版本开始可用。如果您使用正确的版本但它仍然不起作用,您可以使用旧方式部署工件 - 在多个命令中。
要部署源 jar 使用:
和 javadoc jar:
First check if you are using plugin version 2.7. According documentation the option
sources
andjavadoc
are available from this version on.If you using the correct version and it still doesn't work you can deploy the artifacts using old way - in multiple command.
To deploy source jar use:
and javadoc jar:
您需要另外指定 -DrepositoryId
you need to additionally specify the -DrepositoryId