Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
04-26-2015, 10:47 AM
|
#1
|
Member
Registered: Sep 2008
Posts: 556
Rep:
|
cannot get maven to work
I'm running centos 6 64bit and trying to get apache-maven-3.3.1 to work. I followed instructions both here:
http://maven.apache.org/guides/getti...e-minutes.html
and here:
http://www.tutorialspoint.com/maven/...ment_setup.htm
but when I do 'mvn --version' I get:
Code:
# mvn --version
Error: Could not find or load main class org.codehaus.plexus.classworlds.launcher.Launcher
echo $PATH gives this:
Code:
# echo $PATH
/usr/local/apache-maven/apache-maven-3.3.1/bin/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/local/apache-maven/apache-maven-3.3.1/bin
this looks like a mess.
I've been trawling google for ages and nothing works in solving this error. I read that I have to remove environmental variables but can't find a way to do that. Can anybody help please?
|
|
|
04-26-2015, 11:09 AM
|
#2
|
Member
Registered: Apr 2014
Distribution: Slackware
Posts: 92
Rep: 
|
First of all, is there any particular reason you're running Maven as root? You'll generally be doing your development, etc. as a regular user, so you usually won't need to run it as root.
OK, first of all, you have two entries for Maven in your PATH. Get rid of that first one, because it has an extra "/bin" in it.
Last edited by ndc85430; 04-26-2015 at 11:10 AM.
|
|
|
04-26-2015, 11:49 AM
|
#3
|
Member
Registered: Sep 2008
Posts: 556
Original Poster
Rep:
|
thanks but how does one get rid of an unwanted PATH? I have searched on google about this but can't the way it's done.
update: I don't believe this. I logged out of the console, took the dog a walk, got your reply and tried again. Now it says:
Quote:
# mvn --version
Apache Maven 3.3.1 (cab6659f9874fa96462afef40fcf6bc033d58c1c; 2015-03-13T20:10:27+00:00)
Maven home: /usr/local/apache-maven/apache-maven-3.3.1
Java version: 1.7.0_75, vendor: Oracle Corporation
Java home: /usr/java/jdk1.7.0_75/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "2.6.32-042stab093.5", arch: "amd64", family: "unix"
|
so I guess it's working.
Last edited by tonj; 04-26-2015 at 11:53 AM.
|
|
|
04-26-2015, 12:11 PM
|
#4
|
LQ Addict
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 24,271
|
yes, it looks like, the solution was to log out and log on again (the old shell did not recognize the configuration properly). But again, please do not use root if not required.
|
|
|
04-26-2015, 12:29 PM
|
#5
|
Member
Registered: Apr 2014
Distribution: Slackware
Posts: 92
Rep: 
|
Quote:
Originally Posted by tonj
thanks but how does one get rid of an unwanted PATH? I have searched on google about this but can't the way it's done.
|
Well, how did you add it in the first place? You probably edited your .bashrc or similar file. You should just be able to remove it from there.
|
|
|
All times are GMT -5. The time now is 04:52 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|