I'm working on a Scientific Linux box and am trying to install Maven using the yum
command. Scientific Linux for those of you who do not know is based off of Red Hat Linux Enterprise Edition 6.
I'd prefer to install Maven in a way that lent itself to easy updating, that is why I have shied away from simply going to the Apache Maven site and getting the files I need.
Simply running yum
with root privileges was not enough. I used yum search maven
which returned "JPackage Utilities", which I tried to install only to get:
Package jpackage-utils-1.7.5-3.12.el6.noarch already installed and latest version
I was assuming that something like creating a new repo file something like /etc/yum.repos.d/maven.repo
would do the trick.
I found a site suggesting that I point my maven.repo file to the URL http://www.jpackage.org/jpackage50.repo, however this seems to be a fix for an older version of Linux as it did not solve my problem
As always thanks in advance for any help or suggestions!
The distro agnostic generic repo is what you want. As root, add a couple of the jpackage-generic repos to yum (two snippets below). Then perform a yum update and finally yum install maven2.
cat > /etc/yum.repos.d/jpackage-generic-free.repo << EOF
[jpackage-generic-free]
name=JPackage generic free
baseurl=http://mirrors.dotsrc.org/jpackage/6.0/generic/free/
enabled=1
gpgcheck=1
gpgkey=http://www.jpackage.org/jpackage.asc
EOF
cat > /etc/yum.repos.d/jpackage-generic-devel.repo << EOF
[jpackage-generic-devel]
name=JPackage Generic Developer
baseurl=http://mirrors.dotsrc.org/jpackage/6.0/generic/devel/
enabled=1
gpgcheck=1
gpgkey=http://www.jpackage.org/jpackage.asc
EOF
I had all kinds of conflicts trying to use the JPackage repo with Scientific Linux 6.2, but I had much better luck with dchen's repo from the "Fedora People" unofficial repositories. The repo config I used is:
# Note: Replaced $releasever with 6Server since SL's "6.2" doesn't work
[epel-apache-maven]
name=maven from apache foundation.
baseurl=http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-6Server/$basearch/
enabled=1
skip_if_unavailable=1
gpgcheck=0
[epel-apache-maven-source]
name=maven from apache foundation. - Source
baseurl=http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-6Server/SRPMS
enabled=0
skip_if_unavailable=1
gpgcheck=0
The package itself is called apache-maven
and installs maven 3.0.3.
This is more updated way:
curl http://www.jpackage.org/jpackage50.repo > /etc/yum.repos.d/jpackage.repo
yum update
yum install maven2
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With