NOTICE! This is a static HTML version of a legacy ImageJ Trac ticket.

The ImageJ project now uses GitHub Issues for issue tracking.

Please file all new issues there.

Ticket #1785 (closed enhancement: fixed)

Opened 2013-04-08T14:01:57-05:00

Last modified 2013-04-14T23:58:52-05:00

Investigate better ways to use the maven-release-plugin

Reported by: dscho Owned by: dscho
Priority: major Milestone: imagej-2.5.0
Component: Build System Version:
Severity: serious Keywords:
Cc: curtis Blocked By:
Blocking: #1783


The release:prepare goal of the maven-release-plugin pushes directly to master. It would be better if we could push to an orphan branch and just bump up the version in the master branch.

Maybe release:branch allows us to do so (see

Change History

comment:1 Changed 2013-04-08T16:18:02-05:00 by dscho

It seems that release:branch tries to use a branch instead of a tag, which is not exactly what we want.

Probably it is better to do something like this:

# Prepare new release without pushing (requires the release plugin >= 2.1)
mvn --batch-mode release:prepare -DpushChanges=false -Dresume=false \
# Squash the two commits on the current branch into one
git reset --soft HEAD^^
git commit -s -m "Bump to next development cycle"
# push the current branch and the tag
git push origin HEAD $(sed -n 's/^scm.tag=//p' <

comment:2 Changed 2013-04-09T13:29:58-05:00 by dscho

This is now part of scijava-common:

It only misses the part where it checks out the tag, calls mvn clean verify deploy, and checks out the formerly-current branch using git checkout @{-1}. (Which is not hard to add, but time-consuming to test.)

Last edited 2013-04-09T13:30:19-05:00 by dscho

comment:3 Changed 2013-04-14T23:58:52-05:00 by dscho

  • Status changed from new to closed
  • Resolution set to fixed

With Curtis' recent changes to scijava-common's bin/, this issue is fully addressed.