Maven Release Plugin部署sources.jar和javadoc.jar
我使用 Maven 发布插件来生成项目的发布版本。我不想在构建时一直生成 Javadoc。另一方面,当我调用release:perform时,我希望maven是否会生成sources.jar和javadoc.jar并将其部署到maven发布存储库。只是因为我很好奇如何禁用部署 source.jar,因为它看起来像是默认部署的。
I use maven release plugin for generating release of my project. I do not want to generate Javadoc all time I build. On the other hand when I call release:perform I would like if maven would generate sources.jar and javadoc.jar and would deploy it to maven release repository. Just because I am curious how deploying source.jar can be disabled, since It looks like it is deployed by default.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
从 Maven Release Plugin 的文档中,有一个
useReleaseProfile
参数,该参数确定是否使用将源代码和 javadoc 添加到已发布工件的发布配置文件(如果适用)
。默认情况下这是true
。您可以尝试根据情况更改此设置以启用/禁用 source/javadocs。From the documentation of Maven Release Plugin, there is a
useReleaseProfile
parameter, which determinesWhether to use the release profile that adds sources and javadocs to the released artifact, if appropriate
. This istrue
by default. You can try changing this as appropriate to enable/disable source/javadocs.使用 releaseProfiles 参数(示例:
src,javadoc
) 打开一个或多个配置文件,并在这些配置文件中定义源和 javadoc 生成:Use the releaseProfiles parameter (example:
src,javadoc
) to turn on one or more profiles, and in these profiles, define the source and javadoc generation: