This one had me a bit baffled but the recipe turned out to be easy once you know which chickens to sacrifice in which order. So:
Add the jpackage info into /etc/yum.repos.d:
Fix a dependency problem:
rpm -Uvh http://plone.lucidsolutions.co.nz/linux/centos/images/jpackage-utils-compat-el5-0.0.1-1.noarch.rpm
Then yum update and then:
yum install maven2
400 updates later, you’re in business!
# mvn --version /usr/lib/jvm/java Maven version: 2.0.7 Java version: 1.6.0_17 OS name: "linux" version: "2.6.18-194.el5" arch: "amd64"
That’s all! Hopefully this will get some google fu and help someone!