Details
-
Type:
Improvement
-
Status:
Closed
-
Priority:
Major
-
Resolution: Won't Fix
-
Affects Version/s: 2.1
-
Fix Version/s: 2.2
-
Component/s: None
-
Labels:None
-
Number of attachments :
Description
as it tries to clone the remote repo, which has not yet been pushed - so there's no tag in the remote repo yet.
Ideally if pushChanges is false, it should use a value of
<scm>
<developerConnectionL>scm:git:file://${baseDir}</developerConnection>
...
</scm>
so that it clones from the current local git repo (which has everything inside it) rather than the remote repo which has yet to be pushed.
BTW a great use case for not pushing is using a staging maven repo like Nexus; which may reject an attempt to promote a staged build, so you only want to push after a downstream stage works.
BTW using 2.1 you can do a release using pushChanges as false. For those interested here's how I did it...
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-release-plugin</artifactId> <version>2.1</version> <configuration> <pushChanges>false</pushChanges> <autoVersionSubmodules>true</autoVersionSubmodules> <allowTimestampedSnapshots>false</allowTimestampedSnapshots> <arguments>-Prelease</arguments> </configuration> </plugin><scm> <!-- TODO - hack this in your ~/.m2/settings.xml to point to your local checkout for releases --> <developerConnection>${release-altGitURL}</developerConnection> ... </scm><settings> <profiles> <profile> <id>release</id> <properties> <release-altGitURL>scm:git:file:///directory/where/my/code/is</release-altGitURL> </properties> </profile> </profiles>