maven-release-plugin将快照部署到archiva [英] maven-release-plugin deploys snapshot to archiva
问题描述
如何强制mvn release:perform部署到我的版本中,而不要删除我的快照存储库? release:perform始终部署SNAPSHOT版本.恕我直言
How can I force mvn release:perform to deploy to my release and not tom my snapshot repository? release:perform always deploys SNAPSHOT versions. Which makes no sense IMHO
我的pom.xml中有
I have in my 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>
推荐答案
我发现了问题:问题是,当maven-release-plugin
(版本2.4.2)时,我需要更新maven-scm-provider-gitexe
依赖项.使用Git作为SCM:
I found the problem: The problem is, that I needed to update the maven-scm-provider-gitexe
dependency, for the maven-release-plugin
(version 2.4.2), when using Git as SCM:
<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版本:准备不提交更改到pom.xml
I found the solution here: mvn release:prepare not committing changes to pom.xml
您可以在此处找到一个有效的示例: https://github.com/tarator/releaseplugintest
You can find a working example here: https://github.com/tarator/releaseplugintest
这篇关于maven-release-plugin将快照部署到archiva的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!