gpt4 book ai didi

maven - mvn 发布 :perform automatically specify scm tag that includes release version

转载 作者:行者123 更新时间:2023-12-01 06:51:32 25 4
gpt4 key购买 nike

我想设置我的 maven 版本以批处理模式运行,但我不喜欢默认的 scm 标签 ${artifactId}-${releaseVersion} .相反,我想简单地用 ${releaseVersion} 标记它;但是,我不清楚这样的属性是否存在(即没有 -SNAPSHOT 后缀)。

我希望配置类似于下面的代码。 maven-release-plugin 是否可以使用这种默认标记?

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.0</version>
<configuration>
<tag>${releaseVersion}</tag>
</configuration>
</plugin>

最佳答案

在使用 Hudson 进行发布时,我刚刚得到了这个。我注意到 Hudson(使用 Maven 发布插件)正在使用 -Dproject.rel.com.example:my-artifact-id=1.0.1 之类的属性启动命令。使用以下插件配置:

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<configuration>
<tag>REL-${project.rel.com.example:my-artifact-id}</tag>
</configuration>
</plugin>

导致标签为 REL-1.0.1

我是发布插件的新手,但我认为类似的东西可以从命令行工作。

关于maven - mvn 发布 :perform automatically specify scm tag that includes release version,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2470176/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com