Skip to content
Lakshmi Devi Priya edited this page Jul 10, 2020 · 2 revisions

installing and running Maven

what is Maven and why do we need it?

Maven is a tool to build Java programs, then install them and also run them. We need it to compile ami3. (You can also run ami3 from a JAR without Maven but it is less flexible - you have to wait for me to upload the JAR - this might change).

installing Maven executable

Pre-requirements

  • JDK. Download the latest version(14.0.1) of JDK from here and set its path.
  • Ensure JAVA_HOME environment variable is set and points to your JDK installation.

Downloading maven

  • The latest version of apache-maven is 3.6.3 .
  • To download Maven executable file, click here.
  • Select apache-maven-3.6.3 of Binary zip archive or Binary tar.gz archive under the column link.
  • The download starts automatically. After downloading, click on the executable file. Extract the apache-maven folder into your directory.

Setting path for maven

  • Open your preferred archive extraction tool, add the bin directory of the created directory apache-maven-3.6.3 to the PATH environment variable.
  • Confirm its installation and path with mvn -v in a new shell/command prompt.

For Windows, the path will be like C:\Program Files\apache-maven-3.6.3\bin and output of the command mvn -v should be similar to

Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: C:\Program Files\apache-maven-3.6.3\bin\..
Java version: 14.0.1, vendor: Oracle Corporation, runtime: C:\Program Files\Java\jdk-14.0.1
Default locale: en_GB, platform encoding: UTF-8
OS name: "windows 10", version: "10", arch: "amd64", family: "windows"

For Unix-based Operating System (Linux, Solaris and Mac OS X), the path will be like /opt/apache-maven-3.6.3/bin and the output of the command mvn -v should be similar to

Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: /opt/apache-maven-3.6.3
Java version: 1.8.0_45, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.8.5", arch: "x86_64", family: "mac"

building/installing with Maven

Maven is used in installing ami3. See https://github.com/petermr/openVirus/wiki/Tools:-ami3 for installing ami3.

Clone this wiki locally