Thursday, May 8, 2014

Maven release plugin skipped version bump



How to fix the problem - just do that version bump yourself manually, second time it will work automatically

Here is history of commands of my failed 6.6.15 and 6.6.16, and how I made it work:

git tag -d 6.6.15
git tag -d 6.6.16
git push origin :/ref/tags/6.6.15
git push origin :refs/tags/6.6.16
mvn release:clean release:prepare -Darguments='-DskipTests=true'
gitk --all
git reset HEAD~1 --hard
git clean -fx
git pull
gitk --all
mvn versions:set -DnewVersion=6.6.16-SNAPSHOT
git status
git clean -fx
git diff
git add .
git commit -m "manual version bump"
git push
mvn release:clean release:prepare -Darguments='-DskipTests=true'
git pull
git clean -fx
Another way to fix similar problem is to update maven-release-plugin to new version:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.5</version>


 </plugin>

result in tag commited to remote but version bump was not happen to snapshot, see logs for details



outputs from picture provided below.


problematic launch output:
===================================================
[INFO] [INFO] Building jar: /home/rivanov/java/git/feed/extract/target/extractor-tests.jar
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] Reactor Summary:
[INFO] [INFO] 
[INFO] [INFO] feed ............................................. SUCCESS [  X.XXX s]
[INFO] [INFO] feed-access ...................................... SUCCESS [  X.XXX s]
[INFO] [INFO] feed-extract ..................................... SUCCESS [  X.XXX s]
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] BUILD SUCCESS
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] Total time: 4.597 s
[INFO] [INFO] Finished at: 2014-03-27T15:17:56-08:00
[INFO] [INFO] Final Memory: 34M/222M
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] Checking in modified POMs...
[INFO] Executing: /bin/sh -c cd /home/rivanov/java/git/feed && git add -- pom.xml access/pom.xml extract/pom.xml
[INFO] Working directory: /home/rivanov/java/git/feed
[INFO] Executing: /bin/sh -c cd /home/rivanov/java/git/feed && git status
[INFO] Working directory: /home/rivanov/java/git/feed











[INFO] Tagging release with the label 6.6.15...
[INFO] Executing: /bin/sh -c cd /home/rivanov/java/git/feed && git 
tag -F /tmp/maven-scm-1595271495.commit 6.6.15
[INFO] Executing: /bin/sh -c cd /home/rivanov/java/git/feed 
&& git push git@git.mycompany.com:feed 6.6.15
[INFO] Working directory: /home/rivanov/java/git/feed
[INFO] Executing: /bin/sh -c cd /home/rivanov/java/git/feed && git ls-files
[INFO] Working directory: /home/rivanov/java/git/feed
[INFO] Transforming 'feed'...
[INFO] Transforming 'feed-access'...
[INFO] Transforming 'feed-extract'...
[INFO] Not removing release POMs
[INFO] Checking in modified POMs...
[INFO] Executing: /bin/sh -c cd /home/rivanov/java/git/feed && git add -- pom.xml access/pom.xml extract/pom.xml
[INFO] Working directory: /home/rivanov/java/git/feed
[INFO] Executing: /bin/sh -c cd /home/rivanov/java/git/feed && git status
[INFO] Working directory: /home/rivanov/java/git/feed
[INFO] Release preparation complete.
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] feed ............................................. SUCCESS [ 11.454 s]
[INFO] feed-access ...................................... SKIPPED
[INFO] feed-extract ..................................... SKIPPED






correct launch output:
====================================================
[INFO] [INFO] Building jar: /home/rivanov/java/git/feed/extract/target/extractor-tests.jar
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] Reactor Summary:
[INFO] [INFO] 
[INFO] [INFO] feed ............................................. SUCCESS [  X.XXX s]
[INFO] [INFO] feed-access ...................................... SUCCESS [  X.XXX s]
[INFO] [INFO] feed-extract ..................................... SUCCESS [  X.XXX s]
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] BUILD SUCCESS
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] Total time: 4.597 s
[INFO] [INFO] Finished at: 2014-03-27T15:17:56-08:00
[INFO] [INFO] Final Memory: 34M/222M
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] Checking in modified POMs...
[INFO] Executing: /bin/sh -c cd /home/rivanov/java/git/feed && git add -- pom.xml access/pom.xml extract/pom.xml
[INFO] Working directory: /home/rivanov/java/git/feed
[INFO] Executing: /bin/sh -c cd /home/rivanov/java/git/feed && git status
[INFO] Working directory: /home/rivanov/java/git/feed

============================
[INFO] Executing: /bin/sh -c cd /home/rivanov/java/git/feed 
&& git commit --verbose -F /tmp/maven-scm-218607872.commit pom.xml access/pom.xml extract/pom.xml
[INFO] Working directory: /home/rivanov/java/git/feed
[INFO] Executing: /bin/sh -c cd /home/rivanov/java/git/feed && git symbolic-ref HEAD
[INFO] Executing: /bin/sh -c cd /home/rivanov/java/git/feed 
&& git push git@git.mycompany.com:feed test-mvn-release:test-mvn-release
[INFO] Working directory: /home/rivanov/java/git/feed
============================

[INFO] Tagging release with the label 6.6.17...
[INFO] Executing: /bin/sh -c cd /home/rivanov/java/git/feed 
&& git tag -F /tmp/maven-scm-1830116578.commit 6.6.17
[INFO] Working directory: /home/rivanov/java/git/feed
[INFO] Executing: /bin/sh -c cd /home/rivanov/java/git/feed 
&& git push git@git.mycompany.com:feed 6.6.17
[INFO] Working directory: /home/rivanov/java/git/feed
[INFO] Executing: /bin/sh -c cd /home/rivanov/java/git/feed && git ls-files
[INFO] Working directory: /home/rivanov/java/git/feed
[INFO] Transforming 'feed'...
[INFO] Transforming 'feed-access'...
[INFO] Transforming 'feed-extract'...
[INFO] Not removing release POMs
[INFO] Checking in modified POMs...
[INFO] Executing: /bin/sh -c cd /home/rivanov/java/git/feed && git add -- pom.xml access/pom.xml extract/pom.xml
[INFO] Working directory: /home/rivanov/java/git/feed
[INFO] Executing: /bin/sh -c cd /home/rivanov/java/git/feed && git status
============================
[INFO] Working directory: /home/rivanov/java/git/feed
[INFO] Executing: /bin/sh -c cd /home/rivanov/java/git/feed 
&& git commit --verbose -F /tmp/maven-scm-1562430778.commit pom.xml access/pom.xml extract/pom.xml
[INFO] Working directory: /home/rivanov/java/git/feed
[INFO] Executing: /bin/sh -c cd /home/rivanov/java/git/feed && git symbolic-ref HEAD
[INFO] Working directory: /home/rivanov/java/git/feed
[INFO] Executing: /bin/sh -c cd /home/rivanov/java/git/feed 
&& git push git@git.mycompany.com:feed test-mvn-release:test-mvn-release
============================
[INFO] Working directory: /home/rivanov/java/git/feed
[INFO] Release preparation complete.
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] feed ............................................. SUCCESS [ 11.454 s]
[INFO] feed-access ...................................... SKIPPED
[INFO] feed-extract ..................................... SKIPPED


====================================================


No comments:

Post a Comment