Maven installation through the apt-get package manager

Make sure that Java is installed in your Linux distribution, which you can check by running the following command in a Terminal shell:

java -versionopenjdk version "9-internal"OpenJDK Runtime Environment (build 9-internal+0-2016-04-14-195246.buildd.src)OpenJDK 64-Bit Server VM (build 9-internal+0-2016-04-14-195246.buildd.src, mixed mode)

If Java has not been installed, then run the following command:

sudo apt-get update && sudo apt install openjdk-9-jre

Next, install Maven by running the following command in your Terminal application:

sudo apt-get install maven

Next, you will need to make sure that your JAVA_HOME environment variable has been set. Since we installed Java 1.9 in a Ubuntu ...

Get Hands-On Continuous Integration and Delivery now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.