Maven Release: Prepare/Perform after Rollback incorrectly succeeds with wrong content -


we use maven subversion internally. use maven's release plugin. noticed issue described below when running through following (correct, presume) steps.

1. run release:prepare:

  • maven updates trunk version 1.0.0.
  • maven runs svn copy trunk/myproject tags/myproject-1.0.0, creating tag myproject-1.0.0.
  • maven updates trunk version 1.0.1-snapshot.

2. run release:rollback:

  • maven resets trunk version 1.0.0-snapshot.
  • maven not remove tag, because maven doesn't kind of stuff.

3. commit more changes trunk, against version 1.0.0-snapshot.


4. run release:prepare again:

  • maven updates trunk version 1.0.0.
  • maven runs svn copy trunk/myproject tags/myproject-1.0.0, thinking created tag myproject-1.0.0 out of latest trunk. but, alas, subversion (1.6 , 1.7 alike) instead create tags/myproject-1.0.0/myproject on maven's behalf.

5. run release:perform:

  • maven checks out contents of tag myproject-1.0.0.
  • maven builds contents , deploys result nexus.

the problem obvious: change in step 3 did not make tag. releasing 1.0.0 without change in it.

the questions are: how can fix this? maven's release rollback feature inherently broken?

in fairness, rollback should reset project , scm state allows second prepare occur. this includes removing tag. answer apparent (googling "maven release rollback remove tag"):

http://maven.apache.org/maven-release/maven-release-plugin/examples/rollback-release.html:

the created branch/tag in scm release removed. note: not yet implemented you need manually remove branch/tag scm. more info see mrelease-229.

the resolution force release:rollback include command delete scm tag using org.codehaus.mojo:exec-maven-plugin. short of this, wrap rollback inside script externally.


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -