Maven

How to install Maven on Ubuntu

In this tutorial, we will show you an easy way to install Apache Maven 3 on Ubuntu 12 and Ubuntu 13 releases.

1. Search for the Apache Maven package in Ubuntu Repositories

Open a terminal and execute the command:
 
 
 
 

$ apt-cache search maven

in order to get  a list with all available packages, related to Maven.

mvn_search_WM

The maven package contains the latest version of the Apache Maven for Ubuntu.

2. Install the Appropriate Package

Execute the command:

$ sudo apt-get install maven

in order for the latest version of the Apache Maven to get installed on your computer.

mvn_install_WM

Depending on your internet connection, the installation may require a few minutes to finish.

3. Verify the Installation

To verify your installation, execute the command:

$ mvn -version

If the installation has been completed successfully, you shall see a similar output, depending on the installed version of Java and Ubuntu:

mvn_version_WN

By default, the apt-get command, installs the Apache Maven software in /usr/share/maven. You can inspect the elements of the created folder by executing the command:

$ ls -l /usr/share/maven/

The contents of the newly created folder are the following:

mvn_home_WM

Finally, the apt-get command, also installs some configuration files for Apache Maven, in the folder /etc/maven. You can inspect the elements of the created folder by executing the command:

$ ls -l /etc/maven/

The contents of the newly created folder are the following:

mvn_config_WM

This was an example on how to install Apache Maven on Ubuntu.

Sotirios-Efstathios Maneas

Sotirios-Efstathios (Stathis) Maneas is a PhD student at the Department of Computer Science at the University of Toronto. His main interests include distributed systems, storage systems, file systems, and operating systems.
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Inline Feedbacks
View all comments
Back to top button