Aarthi Ananth
Aarthi Ananth

Reputation: 500

Maven update in macOS

My current maven version is 3.5.0 I would like to update this version to 3.5.4 in my Mac book macOS based system without using homebrew.

When I extracted the new version maven then the command mvn -version still points to the older one. It doesn't override the new version with old as if would have expected.

Upvotes: 2

Views: 2715

Answers (1)

Aarthi Ananth
Aarthi Ananth

Reputation: 500

I could resolve this issue.

  1. Extract the maven
  2. change the path in my .bash_profile file from maven-3.5.0 to maven-3.5.4

  3. export M2_HOME=/Applications/apache-maven-3.5.4

    export PATH=$PATH:$JAVA_HOME/bin:$M2_HOME/bin

  4. Quit and reopen the command window fetching maven version.

Thus maven was updated with the latest version.

Upvotes: 1

Related Questions