[英]Is the distributionManagement element really needed with the maven release plugin?
I assumed for a long time that the distributionManagement tag was required for the maven release plugin because it needs to know where to upload the released artifacts.很长一段时间以来,我一直认为 maven 发布插件需要 distributionManagement 标记,因为它需要知道将发布的工件上传到哪里。 But to some extent this is true.但在某种程度上,这是真的。 If I configure my pom.xml like this, maven complains about missing distributionManagement:如果我像这样配置我的 pom.xml,maven 会抱怨缺少 distributionManagement:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.github.nbauma109</groupId>
<artifactId>jd-util</artifactId>
<version>1.0.16-SNAPSHOT</version>
<scm>
<connection>scm:git:https://github.com/nbauma109/jd-util.git</connection>
<developerConnection>scm:git:ssh://git@github.com/nbauma109/jd-util.git</developerConnection>
<url>https://github.com/nbauma109/jd-util</url>
<tag>HEAD</tag>
</scm>
</project>
I got confused in my first anaylsis.我在第一次分析时感到困惑。
Basically there are 2 options :基本上有2个选项:
https:\/\/stackoverflow.com\/a\/59917365\/8315843<\/a> https:\/\/stackoverflow.com\/a\/59917365\/8315843<\/a>
<plugin> <groupId>org.apache.maven.plugins<\/groupId> <artifactId>maven-release-plugin<\/artifactId> <configuration> <arguments>${arguments}<\/arguments> <goals>install<\/goals> <autoVersionSubmodules>true<\/autoVersionSubmodules> <\/configuration> <\/plugin><\/code><\/pre>
- Configure the deploy plugin to skip the deploy step :配置部署插件以跳过部署步骤:<\/li><\/ul>
https:\/\/maven.apache.org\/plugins\/maven-deploy-plugin\/faq.html<\/a> https:\/\/maven.apache.org\/plugins\/maven-deploy-plugin\/faq.html<\/a>
<plugin> <groupId>org.apache.maven.plugins<\/groupId> <artifactId>maven-deploy-plugin<\/artifactId> <version>XY<\/version> <configuration> <skip>true<\/skip> <\/configuration> <\/plugin><\/code><\/pre>"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.