Problems with jasperreports-maven-plugin

I have had intermittent problems with this plugin – and it hasn’t been updated for a long time ??

I have tried various things, including excluding dependencies but tonight I solved it, thanks to this post:

Surprisingly, the solution to my problem was not the accepted answer, but one further down the list:

Just got this problem: log4j 1.2.15 is causing this problem. Using log4j.12.16 removes this problem. see?Missing artifact com.sun.jdmk:jmxtools:jar:1.2.1

As always, this will probably only fix the problem temporarily but, hopefully, this will help someone.

Setting the username and password/ssh-key for maven release

I use Maven to build my software releases. This consists of the following steps:

git commit
git push

mvn release:prepare
mvn release:perform

The problem I often face is that my username on my Mac is different to the username I use on my git server. As a result I get prompted for a password for an incorrect username during the release:perform phase of the release.

The fix to this is easy and is actually one of the answers on this post:, though not the one that was accepted.

To ensure the correct username is used for the release:perform, add the following lines to ~/.m2/settings.xml in your servers section:


If you use ssh keys (as you should), you can do the following:

  <privateKey>[private key file]</privateKey>

The other important point is that the username is added to the file during the prepare step. Unfortunately, you don’t get the error until you do a perform, when it is too late. The solution here is to simply update the scm URLs in with the username you require.

I (re)discovered this about 2 hours after I tried to do a release. Hopefully I’ll think to look here next time!

[EDIT: After another hour, the above doesn’t seem to be enough. I have it working now by adding ${scm.username}@ to the front of my SCM hostnames and putting -Dscm.username=xxxxx on the preparecommand line(settings.xml would also work). It’s also worthwhile ensuring the maven release plugin is using the current version.]

Finally, I begin a blogging site

Strangely, for someone who is involved in IT, I have been reluctant to set up a blogging site. I have given various reasons over the years why I haven’t wanted to do this, the main reason being “I have bookmarks”.

Many people use blogging sites to record an achievement, e.g. how they have solved a problem. I have always relied on being able to use Google to find these sites and save them as bookmarks in my browser so that I can refer back to them. The problem with this technique is that I can’t save any extra information with the bookmarks so I have had to rely on my memory to recall why a particular link was useful. Well, as I am getting older, my memory is not as good as it used to be so it is time to record, not just the site at which I found some useful information, but anything else I have had to do to use the information gleaned from the site.