Maven command mvn doesn't work

Discussion in 'macOS' started by Øyvind, Sep 6, 2010.

  1. Øyvind macrumors newbie

    Joined:
    Sep 6, 2010
    #1
    Hello!

    I god my MacBook Pro a couple of weeks ago, and I am very satisfied!

    I noticed that the Maven version is 2.2.0, and I wanted to update to 2.2.1. I tried to looked at some tutorials on how to do this, but something went wrong.

    In the Terminal, if I write "mvn -v", I get "-bash: mvn: command not found". Normally, I would get some information on what version Maven is and some other things. The strange thing is that when i write "sudo mvn -v" I get what I should:

    Apache Maven 2.2.1 (r801777; 2009-08-06 21:16:01+0200)
    Java version: 1.6.0_20
    Java home: /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home
    Default locale: nb_NO, platform encoding: MacRoman
    OS name: "mac os x" version: "10.6.4" arch: "x86_64" Family: "mac"

    It seems that the command "mvn" is not connected to Maven in a right way. Anybody know how I could fix this?

    Thanks in advance =)
     
  2. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #2
    Do you know where it installed the new maven? It may just need to be added to your path environment so it's recognized. The built-in maven was located at "/usr/bin/mvn" for me, v2.2.0.
     
  3. Øyvind thread starter macrumors newbie

    Joined:
    Sep 6, 2010
  4. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #4
  5. Øyvind thread starter macrumors newbie

    Joined:
    Sep 6, 2010

Share This Page