Skip to content

Instantly share code, notes, and snippets.

@ilgrosso
Last active May 5, 2023 13:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ilgrosso/b2abd6674290d6fe144704dffbeda418 to your computer and use it in GitHub Desktop.
Save ilgrosso/b2abd6674290d6fe144704dffbeda418 to your computer and use it in GitHub Desktop.
Apache Syncope's release process changes since maven-release-plugin does not work anymore

During the release process for Apache Syncope 2.1.14 I noticed that release:prepare was not advancing POM version from 2.1.14-SNAPSHOT to 2.1.14, nor it was creating the syncope-2.1.14 tag.

Waiting to understand the reason, I was able to replace the actions peformed by release:prepare and release:perform with the following.

Release prepare

Plugin steps: http://maven.apache.org/maven-release/maven-release-plugin/examples/prepare-release.html

Change version to 2.1.14

mvn -T 1C -P all,docker,skipTests,without-eclipse versions:set -DnewVersion=2.1.14
mvn -T 1C -P all,docker,skipTests versions:commit

Then update

  • ide/eclipse/bundles/org.apache.syncope.ide.eclipse.plugin/META-INF/MANIFEST.MF
  • ide/eclipse/bundles/org.apache.syncope.ide.eclipse.tests/META-INF/MANIFEST.MF
  • ide/eclipse/releng/org.apache.syncope.ide.eclipse.site/category.xml

by replacing 2.1.14.qualifier with 2.1.14.

In root pom.xml, replace

<tag>HEAD</tag>

with

<tag>syncope-2.1.14</tag>

then set

<project.build.outputTimestamp>2021-07-16T09:00:00Z</project.build.outputTimestamp>

to the current date and time (for reproducible builds).

Build artifacts for release

mvn -T 1C -P apache-release,all,docker,skipTests -DbuildNumber=syncope-2.1.14

At this point, I copied artifacts to staging area.

Create release tag

git commit -a -m "prepare release syncope-2.1.14"
git tag syncope-2.1.14 -a -m "copy for tag syncope-2.1.14"
git push --tags

Advance version

mvn -T 1C -P all,docker,skipTests,without-eclipse versions:set -DnewVersion=2.1.15-SNAPSHOT
mvn -T 1C -P all,docker,skipTests versions:commit

Then update

  • ide/eclipse/bundles/org.apache.syncope.ide.eclipse.plugin/META-INF/MANIFEST.MF
  • ide/eclipse/bundles/org.apache.syncope.ide.eclipse.tests/META-INF/MANIFEST.MF
  • ide/eclipse/releng/org.apache.syncope.ide.eclipse.site/category.xml

by replacing 2.1.14 with 2.1.15.qualifier.

In root pom.xml, replace

<tag>syncope-2.1.14</tag>

with

<tag>HEAD</tag>

Finally:

git commit -a -m "prepare for next development iteration"

Release perform

I created a release.properties file with following content:

scm.url=scm:git:https://gitbox.apache.org/repos/asf/syncope.git
scm.tag=syncope-2.1.14

then I was able to run the command as per step 3 in the release process instructions, e.g.:

mvn -P apache-release release:perform -Darguments="-P all,docker,skipTests -DbuildNumber=syncope-2.1.14" 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment