You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Unnsse Khan <un...@gmail.com> on 2009/03/22 09:51:39 UTC

Re: How to uninstall / override previous Maven version on OS X Leopard?

Hi Kalle,

Thanks for the suggestion (I thought about the same solution before  
starting this initial thread on the mailing list)...

The Apache Maven 2.1.0 working as the correct one by placing  
$MAVEN_HOME before /usr/bin in my PATH as follows:

export PATH=$MAVEN_HOME/bin:/usr/local/bin:$PATH:/usr/local/sbin: 
$JAVA_HOME/bin:/opt/local/bin:$PS1:$PATH;

The thing I dislike about this approach is that the previous Maven  
(2.0.6) version still exists on my machine.

Prior to Maven 2.1.0, I had installed the 2.0.6 version by downloading  
the tar.gz (tarball) and then building Maven 2.0.6 by scratch which  
placed the mvn script inside my /usr/bin directory.

Is there a way to truly un-install / wipe the previous mvn (2.06)  
version from my system?

Many, many thanks!

On Mar 21, 2009, at 10:40 PM, Kalle Korhonen wrote:

> Well, rather obviously you either rename usr/bin/mvn to something  
> else or
> put $MAVEN_HOME/bin before /usr/bin in your PATH.
>
> Kalle
>
>
> On Sat, Mar 21, 2009 at 9:51 PM, Unnsse Khan <un...@gmail.com>  
> wrote:
>
>> Hello there,
>>
>> I installed Maven (by building the source) awhile ago on my OS X  
>> Leopard
>> machine.
>>
>> When I check version information, this is the feedback, I receive:
>>
>> $ mvn --version
>> Maven version: 2.0.6
>>
>> When I check where its located, this is what is outputted:
>>
>> $ which mvn
>> /usr/bin/mvn
>>
>> $ ls -al /usr/bin/mvn
>> lrwxr-xr-x  1 root  wheel  24 Nov 21 20:43 /usr/bin/mvn ->
>> /usr/share/maven/bin/mvn
>>
>> However, I recently installed the 2.10 binary (via zip extension)  
>> on my
>> machine and set a
>> MAVEN_HOME global system environmental variable and also appended  
>> it to my
>> PATH in .bash_profile.
>>
>> When I run the $MAVEN_HOME/bin/mvn script from the command line,  
>> this is
>> what is outputted:
>>
>> $ $MAVEN_HOME/bin/mvn --version
>> Apache Maven 2.1.0 (r755702; 2009-03-18 12:10:27-0700)
>> Java version: 1.5.0_16
>> Java home: /System/Library/Frameworks/JavaVM.framework/Versions/ 
>> 1.5.0/Home
>> Default locale: en_US, platform encoding: MacRoman
>> OS name: "mac os x" version: "10.5.6" arch: "i386" Family: "unix"
>>
>> How do I uninstall the Maven 2.0.6 version and replace it with  
>> Maven 2.1.0
>> (which is set to my $MAVEN_HOME)?
>>
>> This is what my ~/.bash_profile config looks like:
>>
>> . ~/.profile
>> export PS1="\u@\h:\w$ "
>> export
>> JAVA_HOME="/System/Library/frameworks/JavaVM.framework/Versions/ 
>> 1.5.0/Home";
>> export MAVEN_HOME="/Users/untz/DevTools/Java/maven/apache- 
>> maven-2.1.0";
>> export
>> PATH=/usr/local/bin:$PATH:/usr/local/sbin:$ANT_HOME/bin:$JAVA_HOME/ 
>> bin:$MAVEN_HOME/bin:$PS1:$PATH;
>>
>> Happy programming.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: How to uninstall / override previous Maven version on OS X Leopard?

Posted by Geoffrey Wiseman <ge...@gmail.com>.
On Sun, Mar 22, 2009 at 4:51 AM, Unnsse Khan <un...@gmail.com> wrote:

> Hi Kalle,
>
> Thanks for the suggestion (I thought about the same solution before
> starting this initial thread on the mailing list)...
>
> The Apache Maven 2.1.0 working as the correct one by placing $MAVEN_HOME
> before /usr/bin in my PATH as follows:
>
> export
> PATH=$MAVEN_HOME/bin:/usr/local/bin:$PATH:/usr/local/sbin:$JAVA_HOME/bin:/opt/local/bin:$PS1:$PATH;
>
> The thing I dislike about this approach is that the previous Maven (2.0.6)
> version still exists on my machine.
>
> Prior to Maven 2.1.0, I had installed the 2.0.6 version by downloading the
> tar.gz (tarball) and then building Maven 2.0.6 by scratch which placed the
> mvn script inside my /usr/bin directory.
>
> Is there a way to truly un-install / wipe the previous mvn (2.06) version
> from my system?
>
> Many, many thanks!


"rm -rf /usr/share/maven"?

Typically, on linux and OS X, I'd expand the maven archive into a directory
(e.g.  /usr/share/maven-2.1.0) and toss in some softlinks:

tar zxvf ~/apache-maven-2.1.0.tar.gz
> mv apache-maven-2.1.0 /usr/share/maven-2.1.0
> mv /usr/share/maven /usr/share/maven-2.0.6
> ln -s /usr/share/maven-2.1.0 /usr/share/maven
>
>
Then, at some point in the future, if I decide I don't want maven 2.0.6
anymore, I wipe it.
-- 
Geoffrey Wiseman
http://www.geoffreywiseman.ca/