Sti*_*ens 16 maven maven-release-plugin
我有以下项目结构:
在framework-parent-pom的pom.xml中我定义了以下插件:
<plugin>
<artifactId>maven-release-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<branchBase>http://.../svn/REPO/branches/framework</branchBase>
<tagBase>http://.../svn/REPO/tags/releases/framework</tagBase>
<tagNameFormat>release-@{project.version}</tagNameFormat>
<releaseProfiles>release</releaseProfiles>
</configuration>
</plugin>
Run Code Online (Sandbox Code Playgroud)
在SCM之后:
<scm>
<developerConnection>scm:svn:http://.../svn/REPO/trunk/framework/framework-parent-pom</developerConnection>
</scm>
Run Code Online (Sandbox Code Playgroud)
当我运行以下命令时......
mvn release:prepare -DautoVersionSubmodules=true -Darguments="-DskipTests" -Dresume=false
Run Code Online (Sandbox Code Playgroud)
......一切似乎都顺利.
在本地创建了发布版本的JAR,并且POM已经很好地更新到下一个SNAPSHOT版本.同样在SVN,乍一看似乎没问题.已使用其中的所有框架项目创建标记.
但是,当查看标签的POM时,我发现它们仍然具有初始快照版本作为版本.这当然会导致执行步骤构建快照版本而不是发布版本.
我究竟做错了什么?
我在maven-release-plugin问题跟踪器MRELEASE-812中找到了解决方法:
就我而言,改变是:
<plugin>
<artifactId>maven-release-plugin</artifactId>
- <version>2.2.2</version>
+ <version>2.4.1</version>
<configuration>
<releaseProfiles>release</releaseProfiles>
<goals>install animal-sniffer:check deploy site</goals>
</configuration>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven.scm</groupId>
+ <artifactId>maven-scm-api</artifactId>
+ <version>1.8.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.scm</groupId>
+ <artifactId>maven-scm-provider-gitexe</artifactId>
+ <version>1.8.1</version>
+ </dependency>
+ </dependencies>
</plugin>
Run Code Online (Sandbox Code Playgroud)
小智 5
我有一个类似的问题。它正在标记快照版本,因为它在标记之前没有提交 POM 更改。
我发现它只有在我使用以下配置选项时才有效:
<remoteTagging>false</remoteTagging>
<suppressCommitBeforeTag>false</suppressCommitBeforeTag>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
8045 次 |
| 最近记录: |