TestingDocs.com
Software Testing website
  • Automation
    • Selenium
    • JBehave Framework
  • Tutorials
    • MySQL Tutorials
    • Testlink
    • Maven
    • Git
  • IDEs
    • IntelliJ IDEA
    • Eclipse
  • Flowcharts
    • Flowgorithm
    • Raptor
  • About

Apache Maven

Install Maven on Ubuntu Linux

Ubuntu

Overview

In this tutorial, we will go through the steps involved to install the Maven on the Ubuntu Linux machine. We will explore two options here.

  • Manual Install from Linux archive native package.
  • Install from Ubuntu Package Manger(APT).

#1 Install Maven using Linux native package

This option lets the user to choose the version and customize the install to chosen directory. This approach to install Maven for environment setup like for Software Automation needs to setup Maven home environment variables and add the Maven bin directory to the PATH environment variable.

Navigate to Maven official website.

https://maven.apache.org/download.cgi

Click on the Download button.

 

Maven Download Button

 

Choose Linux archive file and Download and Save the tar file on to the computer.

apache-maven-<version>.tar.gz

Maven Package Download Linux

Extract the contents of the tar file.

$ tar -xvf <maven tar file location> 

Move the contents to a suitable location, For example to  /opt/maven

 

Move Maven Linux

Set M2_HOME

Set the M2_HOME environment variable. Edit /etc/profile file and the variable.

M2_HOME=/opt/maven

PATH= $PATH:$M2_HOME/bin

export M2_HOME

export PATH

 

Etc Profile Linux

Verify the Install

Launch the Terminal.

$ echo $M2_HOME

$ mvn -version 

 

Maven Version Command Linux

The version information should be displayed on successful Maven install.

#2 Install Maven using Package Manager

This option is less technical savvy. The install process is much simpler than the first option.

Launch terminal window

Execute the following command to install the tool.

$ sudo apt install maven

Type Y or y when prompted to install the tool.

Do you want to continue?

The installer would download all the required packages for the Maven tool.

Verification

Launch terminal window

Execute the following command to verify the Maven install.

$ mvn -version

That’s it. We are done with the Maven install on Ubuntu machine.

Install Maven on Windows

https://www.testingdocs.com/installing-apache-maven-3-x-on-windows-10/

–

Maven Tutorials on this website can be found at:
https://www.testingdocs.com/apache-maven-tutorial/

For more details on the Apache Maven, visit the official website at:
https://maven.apache.org/

Related Posts

Maven Download Verification Win11

Apache Maven /

Download Maven on Windows 11

Invalid Target Java Error

Apache Maven /

Fix Fatal Error compiling: Invalid target release in Maven Project

Maven Project from archetype

Apache Maven /

Create Maven Project from Archetype using NetBeans IDE

Create New Project

Apache Maven /

Create a Maven Project skip archetype

Maven Archetype plugin command line

Apache Maven /

Maven Archetype plugin command line

‹ Maven Archetype plugin command line› Create a Maven Project skip archetype

Recent Posts

  • Install RAPTOR Avalonia on CentOS
  • Download RAPTOR Avalonia Edition on Windows
  • npm doctor command
  • Print Triangle Pattern Flowchart
  • RAPTOR Editions
  • Flowgorithm Conditional Breakpoint Statement
  • Flowgorithm Read Numbers from File Example
  • Search Text File Flowchart Example
  • Flowgorithm Turtle Graphics Symbols
  • Draw Circle using Flowgorithm Turtle

Back to Top

Links

  • Contact
  • Privacy Policy
  • Cookie Policy

www.TestingDocs.com

Go to mobile version