Home » Enterprise Java » Maven » How to install Maven on Ubuntu

About Sotirios-Efstathios Maneas

Sotirios-Efstathios Maneas
Sotirios-Efstathios (Stathis) Maneas is a postgraduate student at the Department of Informatics and Telecommunications of The National and Kapodistrian University of Athens. His main interests include distributed systems, web crawling, model checking, operating systems, programming languages and web applications.

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.

Do you want to know how to develop your skillset to become a Java Rockstar?

Subscribe to our newsletter to start Rocking right now!

To get you started we give you our best selling eBooks for FREE!

1. JPA Mini Book

2. JVM Troubleshooting Guide

3. JUnit Tutorial for Unit Testing

4. Java Annotations Tutorial

5. Java Interview Questions

6. Spring Interview Questions

7. Android UI Design

and many more ....

 

Do you want to know how to develop your skillset and become a ...

Subscribe to our newsletter to start Rocking right now!

To get you started we give you our best selling eBooks for FREE!
Get ready to Rock!
To download the books, please verify your email address by following the instructions found on the email we just sent you.

THANK YOU!

Close