![](/img/trans.png)
[英]snapshot version not published after upgrading maven-release-plugin to 2.5.2
[英]maven-release-plugin deploys snapshot to archiva
我如何强制mvn发布:执行部署到我的发布而不是我的快照存储库? release:perform总是部署SNAPSHOT版本。 这没有任何意义恕我直言
我有我的pom.xml
<groupId>com.mydomain</groupId>
<artifactId>MyArtifactName</artifactId>
<version>1.0.6-SNAPSHOT</version>
<packaging>jar</packaging>
<name>MyArtifactName</name>
<url>http://maven.apache.org</url>
<distributionManagement>
<repository>
<id>central</id>
<url>http://repo.example.com/artifactory/libs-release-local</url>
<name>libs-release-local</name>
</repository>
<snapshotRepository>
<id>central</id>
<url>http://repo.example.com/artifactory/libs-snapshot-local</url>
<name>libs-snapshot-local</name>
</snapshotRepository>
</distributionManagement>
<scm>
<tag>HEAD</tag>
<url>http://git.example.com/someUser/myproject</url>
<connection>scm:git:git@git.example.com/someUser/myproject.git</connection>
<developerConnection>scm:git:git@git.example.com/someUser/myproject.git</developerConnection>
</scm>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.4.2</version>
</plugin>
</plugins>
</build>
我发现了问题:问题是,当使用Git作为SCM时,我需要为maven-release-plugin
(版本2.4.2)更新maven-scm-provider-gitexe
依赖项:
<build>
<plugins>
....
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.4.2</version>
<dependencies>
<dependency>
<groupId>org.apache.maven.scm</groupId>
<artifactId>maven-scm-provider-gitexe</artifactId>
<version>1.9</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
我在这里找到了解决方案: mvn release:准备不对pom.xml提交更改
你可以在这里找到一个有效的例子: https : //github.com/tarator/releaseplugintest
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.