要发布我正在使用的应用程序maven-发布-插件.
此过程中的一个步骤是将版本部署到存储库中。我想避免这一步,但是当我从 pom 文件中删除 distributionManagement 时,出现错误:
Deployment failed: repository element was not specified in the POM inside distributionManagement element
如何配置maven-release-plugin跳过部署?
感谢您的任何建议!
每天发布几次这并不是什么不寻常或有趣的事情。空间问题可能是有问题的,但这是一个单独的讨论。
您可以配置maven发布插件 https://maven.apache.org/maven-release/maven-release-plugin/perform-mojo.html发布期间会完成什么样的目标。这最多可以通过在pluginManagement中配置插件来实现。而且你还应该定义你正在使用的所有插件的所有版本(大多数时候,为你的环境创建父pom是最方便的)。
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<configuration>
<arguments>${arguments}</arguments>
<goals>The Goal You would like to execute</goals>
<autoVersionSubmodules>true</autoVersionSubmodules>
</configuration>
</plugin>
所以你可以定义只做install
而不是像这样部署:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<configuration>
<arguments>${arguments}</arguments>
<goals>install</goals>
<autoVersionSubmodules>true</autoVersionSubmodules>
</configuration>
</plugin>
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)