我如何强制mvn发布:执行部署到我的发布而不是我的快照存储库?release:perform总是部署SNAPSHOT版本.这没有任何意义恕我直言
我有我的pom.xml
com.mydomain MyArtifactName 1.0.6-SNAPSHOT jar MyArtifactName http://maven.apache.org central http://repo.example.com/artifactory/libs-release-local libs-release-local central http://repo.example.com/artifactory/libs-snapshot-local libs-snapshot-local HEAD http://git.example.com/someUser/myproject scm:git:git@git.example.com/someUser/myproject.git scm:git:git@git.example.com/someUser/myproject.git org.apache.maven.plugins maven-release-plugin 2.4.2
Tarator.. 8
我发现了问题:问题是,当使用Git作为SCM时,我需要maven-scm-provider-gitexe
为maven-release-plugin
(版本2.4.2)更新依赖关系:
.... org.apache.maven.plugins maven-release-plugin 2.4.2 org.apache.maven.scm maven-scm-provider-gitexe 1.9
我在这里找到了解决方案:mvn release:准备不对pom.xml提交更改
你可以在这里找到一个有效的例子:https://github.com/tarator/releaseplugintest
我发现了问题:问题是,当使用Git作为SCM时,我需要maven-scm-provider-gitexe
为maven-release-plugin
(版本2.4.2)更新依赖关系:
<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