In a terminal run sudo apt-get install maven
Once the install is over check that it works correctly with mvn -v
the output should look like:
Apache Maven 3.3.9
Maven home: /usr/share/maven
Java version: 1.8.0_121, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-8-openjdk-amd64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "4.8.0-parrot-amd64", arch: "amd64", family: "unix"
If this does not work, make sure you have a JDK installed in your environmentjavac -version