1. What is Maven
Apache Maven provides a complete build management platform for Java-based applications. It describes how the project is built and what dependencies it is using. The main advantage of Maven is the automation of the application development process. The only thing developers have to do is to follow the directory naming convention in their projects. Maven will take care of downloading the latest dependencies, compiling the code, performing tests, etc.
In this tutorial, we will show you how to install Apache Maven on Ubuntu 18.04, however, those instructions should apply also for Ubuntu in version 16.04.
Ubuntu account with the
3. Installing Apache Maven on Ubuntu with
The official Ubuntu repositories include Maven package that can be installed with the
apt command. However, the version included in the repositories may be a bit obsolete than what is available on the official Maven website. To install Maven using
apt follow these steps:
3.1. First update the package index
3.2. Next, install Maven by typing the following command
3.3. Check if the Apache Maven has been successfully configured
The output of this command should look like this:
Note that the version of Apache Maven in your output may be different as well as the Java version.
3.4. Where is Maven located in filesystem?
Installing Maven with
apt will put all necessary files into
/etc/maven directory. You can use
ls -la command to print out that files.
And that’s it. You can now start using Maven on your system.
In this article we showcased how to easily install Maven on Ubuntu in version 18.04 or 16.04 using
apt (Advanced Packaging Tool).