简体   繁体   English

"maven 发布插件真的需要distributionManagement 元素吗?"

[英]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>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM