LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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


Reply
  Search this Thread
Old 04-26-2015, 10:47 AM   #1
tonj
Member
 
Registered: Sep 2008
Posts: 546

Rep: Reputation: 37
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?
 
Old 04-26-2015, 11:09 AM   #2
ndc85430
Member
 
Registered: Apr 2014
Distribution: Slackware
Posts: 92

Rep: Reputation: Disabled
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.
 
Old 04-26-2015, 11:49 AM   #3
tonj
Member
 
Registered: Sep 2008
Posts: 546

Original Poster
Rep: Reputation: 37
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.
 
Old 04-26-2015, 12:11 PM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,123

Rep: Reputation: 7371Reputation: 7371Reputation: 7371Reputation: 7371Reputation: 7371Reputation: 7371Reputation: 7371Reputation: 7371Reputation: 7371Reputation: 7371Reputation: 7371
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.
 
Old 04-26-2015, 12:29 PM   #5
ndc85430
Member
 
Registered: Apr 2014
Distribution: Slackware
Posts: 92

Rep: Reputation: Disabled
Quote:
Originally Posted by tonj View Post
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Maven build issue robin444 Programming 0 03-28-2014 12:45 PM
Maven targets Millenniumman Programming 0 07-03-2008 08:14 PM
LXer: Introduction to Apache Maven 2 LXer Syndicated Linux News 0 11-02-2007 10:50 AM
LXer: Get Started with Apache Maven 2 LXer Syndicated Linux News 0 12-22-2006 06:54 AM
how to install maven? snowyice Linux - Software 0 01-08-2006 08:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:40 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration