"mvn -v" - Verify Apache Maven Version

Q

How to verify Apache Maven version?

✍: FYIcenter.com

A

You can run the "mvn -v" command to verify your Apache Maven installation and get the version information

If your Maven installation is at apache-maven-3.5.4, type in the following command:

fyicenter> apache-maven-3.5.4\bin\mvn -v

Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe; 2018-06-17T14:33:14-04:00)
Maven home: C:\fyicenter\apache-maven-3.5.4\bin\..

Java version: 10.0.1, vendor: Oracle Corporation, runtime: C:\PROGRA~1\Java\jdk-10.0.1
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"

If your JDK is installed at a different location, you can use %JAVA_PATH% environment variable to help:

fyicenter> set JAVA_HOME=\fyicenter\jdk-1.8.0

fyicenter> apache-maven-3.5.4\bin\mvn -v

Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe; 2018-06-17T14:33:14-04:00)
Maven home: C:\fyicenter\apache-maven-3.5.4\bin\..
Java version: 1.8.0_45, vendor: Oracle Corporation, runtime: C:\local\jdk\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "x86", family: "windows"

If you are on a Linux computer, the "mvn" command should look like this:

fyicenter$ ./apache-maven-3.8.7/bin/mvn -v

Apache Maven 3.8.7 (b89d5959fcde851dcb1c8946a785a163f14e1e29)
Maven home: /home/fyicenter/apache-maven-3.8.7
Java version: 17.0.1, vendor: Red Hat, Inc., runtime: ...
Default locale: en_CA, platform encoding: UTF-8
OS name: "linux", version: "4.18.0-193.el8.x86_64", arch: "amd64", family: "unix"

 

"mvn -h" - List Maven Commands and Options

Using Apache Maven

Using Apache Maven

⇑⇑ FAQ for Apache Maven

2020-10-20, ∼1118🔥, 0💬