要发布我的应用程序,我正在使用maven-release-plugin。
此过程的第一步是将发行版部署到存储库中。 我想避免此步骤,但是当我从pom文件中删除distributionManagement时,出现了错误:
Deployment failed: repository element was not specified in the POM inside distributionManagement element
如何配置Maven-release-plugin以跳过部署?
感谢您提供任何建议!
每天发布几次这并不稀奇或有趣。.空间问题可能值得怀疑,但这是一个单独的讨论。
您可以配置maven release plugin在发行期间要完成的目标。最好通过在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>
作为mentioned here,您可以使用:
mvn release:perform -Darguments="-Dmaven.deploy.skip=true"
((其他插件也可以使用,例如github-release-plugin
)
如在github-release-plugin
中所见,您还可以在pom.xml中定义一个配置文件,以便在需要时激活glib-briia/cucumber-jvm-scala
pom.xml
。