Posts tagged subversion

camels and rollbacks

I had been preparing a new Struts 2 release for last few weeks. It contains only a tiny change regarding security and I had been counting that it shouldn’t take more than a week to release it. How wrong I was 😉

Everything had started smoothly, I’ve created a new Subversion branch, to not interfere with current on-going development of the new Struts 2.2.2. The branch was made from Subversion tag (yeah, branches, tags and trunks are all the same, just copies 😉 ). Next, I’ve applied a patch to solve the security hole and I was truly sure that’s it –  I can start the release process. So I’ve gone ahead, mvn release:prepare command went smoothly, so the next step was mvn release:perform. And after almost waiting 1h I’ve got a strange looking massage: not all licenses were approved !?!

The first thought, I’m using the latest Maven 3.0.1 and that’s the problem, but it wasn’t. I started looking into RAT plugin source code to check what could be wrong. I’ve just discovered that the plugin is checking wrong Apache License header but also looking for the License’s URL so it should be ok. The origin of the problem was quite simple. The Maven Release plugin allows to make release only from a SNAPSHOT version, so I’ve changed the version only in the parent pom of the project. The rest was unmodified. After changing all the version signatures in all the poms the problem was gone 😉

To launch another release process I’ve had to rollback all the changes made during previous launching release command. mvn release:rollback did the job but I’ve had to manually remove the tag from Subversion repository. And of course I’ve removed the wrong one 🙁

Thanks to Wes for a tip how to rollback such a huge mistake, the command looks like this:

TAG_1 is the removed tag, number 10 is the revision -1 when the tag was The Bye Bye Man streaming

So I’ve started again, to make a release and again something went wrong. I noticed the release plugin is making a tag base on wrong path – it was using the original path of the tag from which the branch was made of instead the branch path. And again I’ve had to rollback all changes and remove the tag – this time the correct one 😉

Resolution was easy – change scm tag in all the poms to point to the branch 😛

And again, I’ve started the release process and this time everything went more than smoothly, all the artifacts were uploaded to Apache Nexus, so the last think before calling a vote was to close a staging repository. And again I was wrong, during that, Nexus reported that two jar files don’t have corresponding files with signature. I’ve checked locally and everything was ok. After short conversation with guys from support, I’ve got the solution – upgrade to latest Apache Parent 🙂

Yep, easy, but to do that I’ve had to once again rollback everything, prepare a new Struts Parent that will inherit from the latest Apache Parent, release it and call for a vote 😀

Finally, after almost 2 months I was able to release Struts – the vote is under way, so if you are Struts PMC, please test the release and vote!

Just to relax a bit, take a time and watch that very inspiring talk about camels:


Last time I had been writing about merging branch to trunk just before deployment to production. Business side wasn’t happy about that, so we had to clean up the mess 😉

It’s very weird how merge can replace whole files with older versions – by older I mean that were formatted on branch – no other changes. In such case it’s very hard to find what was changed. The only hope is in Subversion’s history. It’s the only place where you can find how it was before, though if you have history 😀

Anyway, the problem was solved quite fast and we were able to deploy a new version to test environment and business were able to test it also. The last step was to prepare deployment to production and hope that everything will go smoothly – we will see next day morning!

I also discovered superb future in IntelliJ IDEA – Productivity Guide – you can open it with ALT + H + P

Productivity Guide

BTW the new version of IDEA was release few days ago – Ulimate 9 – I already have it! Hurraaa!

PS. You can be surprised but I’m working remotely from my new home 😉


The “Frozen Zone” was still On, so I had lot of time to contribute to Open Source project – in my case Apache Struts. I’ve been working for few weeks with Maven 2 archetypes, to updated them to latest Strust 2 version. It was quite easy task, I even wrote a simple bash script for automatically testing them.

Nevertheless, became the time when I had to release them – or to be more precise – prepare staging release. I never had been doing that, so always is the first time 😀

I’ve read some tutorials about releasing projects with Maven and there is also a great documentation entry on Apache Struts site about releasing the project. It was the most helpful information. Equipped with knowledge I started the release process. The first three archetypes were released very fast and without any problems (except conflict between Cygwin and Subversion client – next time I will use Linux box 😉 ).

Yap, I thought I’m on the road and then I got problem with checking out tagged project from Subversion. I don’t remember what was the message, but I spent more than hour to solve that problem! Another experience for future.

The whole release process took mi around 5-6 hours so it was enormous achievement in my opinion. The next time it will be faster 😉 And the last thing – the Vote! I started it and was able to relax with cold beer 😀

Go to Top