{"id":3856,"date":"2023-09-09T14:05:04","date_gmt":"2023-09-09T11:05:04","guid":{"rendered":"https:\/\/www.virtono.com\/community\/?p=3856"},"modified":"2023-09-08T14:10:35","modified_gmt":"2023-09-08T11:10:35","slug":"how-to-install-apache-maven-on-ubuntu","status":"publish","type":"post","link":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-apache-maven-on-ubuntu\/","title":{"rendered":"How to Install Apache Maven on Ubuntu"},"content":{"rendered":"<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"422\" data-attachment-id=\"3867\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-apache-maven-on-ubuntu\/attachment\/how-to-install-apache-maven-on-ubuntu\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/How-to-Install-Apache-Maven-on-Ubuntu.png?fit=1920%2C1080&amp;ssl=1\" data-orig-size=\"1920,1080\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"How-to-Install-Apache-Maven-on-Ubuntu\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/How-to-Install-Apache-Maven-on-Ubuntu.png?fit=750%2C422&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/How-to-Install-Apache-Maven-on-Ubuntu.png?resize=750%2C422&#038;ssl=1\" alt=\"How to Install Apache Maven on Ubuntu\" class=\"wp-image-3867\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/How-to-Install-Apache-Maven-on-Ubuntu.png?resize=1024%2C576&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/How-to-Install-Apache-Maven-on-Ubuntu.png?resize=300%2C169&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/How-to-Install-Apache-Maven-on-Ubuntu.png?resize=768%2C432&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/How-to-Install-Apache-Maven-on-Ubuntu.png?resize=1536%2C864&amp;ssl=1 1536w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/How-to-Install-Apache-Maven-on-Ubuntu.png?w=1920&amp;ssl=1 1920w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/figure>\n<\/div>\n\n\n<p><\/p>\n\n\n\n<p>This tutorial aims to provide a detailed, step-by-step guide on how to install Apache Maven on Ubuntu, a popular open-source operating system. In the realm of software development, Apache Maven stands as a robust project management tool, widely embraced for its ability to handle project builds, reporting, and documentation from a central piece of information. It simplifies and standardizes the project build process and provides guidelines for best practices development.<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_73 counter-hierarchy ez-toc-counter ez-toc-light-blue ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-apache-maven-on-ubuntu\/#Apache_Maven_and_Its_Importance\" title=\"Apache Maven and Its Importance\">Apache Maven and Its Importance<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-apache-maven-on-ubuntu\/#Pre-Installation_Requirements\" title=\"Pre-Installation Requirements\">Pre-Installation Requirements<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-apache-maven-on-ubuntu\/#Update_the_Package_List\" title=\"Update the Package List\">Update the Package List<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-apache-maven-on-ubuntu\/#Install_JDK\" title=\"Install JDK\">Install JDK<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-apache-maven-on-ubuntu\/#Verify_Java_Installation\" title=\"Verify Java Installation\">Verify Java Installation<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-apache-maven-on-ubuntu\/#Installing_Apache_Maven_on_Ubuntu\" title=\"Installing Apache Maven on Ubuntu\">Installing Apache Maven on Ubuntu<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-apache-maven-on-ubuntu\/#Step_1_Download_Apache_Maven\" title=\"Step 1: Download Apache Maven\">Step 1: Download Apache Maven<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-apache-maven-on-ubuntu\/#Step_2_Extract_the_Downloaded_Archive\" title=\"Step 2: Extract the Downloaded Archive\">Step 2: Extract the Downloaded Archive<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-apache-maven-on-ubuntu\/#Step_3_Move_Apache_Maven\" title=\"Step 3: Move Apache Maven\">Step 3: Move Apache Maven<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-apache-maven-on-ubuntu\/#Step_4_Set_Up_Environment_Variables\" title=\"Step 4: Set Up Environment Variables\">Step 4: Set Up Environment Variables<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-apache-maven-on-ubuntu\/#Verifying_Apache_Maven_Installation\" title=\"Verifying Apache Maven Installation\">Verifying Apache Maven Installation<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-apache-maven-on-ubuntu\/#How_to_use_Apache_Maven_on_Ubuntu\" title=\"How to use Apache Maven on Ubuntu\">How to use Apache Maven on Ubuntu<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-apache-maven-on-ubuntu\/#Creating_a_New_Project\" title=\"Creating a New Project\">Creating a New Project<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-apache-maven-on-ubuntu\/#Building_the_Project\" title=\"Building the Project\">Building the Project<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-15\" href=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-apache-maven-on-ubuntu\/#Running_the_Project\" title=\"Running the Project\">Running the Project<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-16\" href=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-apache-maven-on-ubuntu\/#Checking_the_Status\" title=\"Checking the Status\">Checking the Status<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-17\" href=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-apache-maven-on-ubuntu\/#Cleaning_the_Project\" title=\"Cleaning the Project\">Cleaning the Project<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-18\" href=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-apache-maven-on-ubuntu\/#Testing_the_Project\" title=\"Testing the Project\">Testing the Project<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-19\" href=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-apache-maven-on-ubuntu\/#Final_Thoughts\" title=\"Final Thoughts\">Final Thoughts<\/a><\/li><\/ul><\/nav><\/div>\n<h3 class=\"wp-block-heading has-accent-color has-text-color\"><span class=\"ez-toc-section\" id=\"Apache_Maven_and_Its_Importance\"><\/span>Apache Maven and Its Importance<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>The Project Object Model (POM) concept serves as the foundation for <a href=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-apache-maven-on-centos-7\/\">Apache Maven<\/a>, also known as Maven, which is a potent tool for managing and understanding software projects. The build process&#8217;s simplicity and the provision of a standardized build system are Maven&#8217;s main objectives. The following management options are provided to developers:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Builds<\/li>\n\n\n\n<li>Documentation<\/li>\n\n\n\n<li>Reporting<\/li>\n\n\n\n<li>Dependencies<\/li>\n\n\n\n<li>SCMs<\/li>\n\n\n\n<li>Releases<\/li>\n\n\n\n<li>Distribution<\/li>\n<\/ul>\n\n\n\n<p>Maven is a crucial tool in contemporary software development because of its extensive feature set, especially for tasks requiring a standardized and repeatable build system.<\/p>\n\n\n\n<h3 class=\"wp-block-heading has-accent-color has-text-color\"><span class=\"ez-toc-section\" id=\"Pre-Installation_Requirements\"><\/span>Pre-Installation Requirements<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Before proceeding with the installation of Apache Maven on Ubuntu, ensure that you have:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>A <a href=\"https:\/\/virtono.com\/cloud-vps\" target=\"_blank\" rel=\"noopener\">Virtono VPS<\/a> running Ubuntu OS (preferably the latest version)<\/li>\n\n\n\n<li>A user account with sudo privileges<\/li>\n\n\n\n<li>Installing Java Development Kit (JDK)<\/li>\n<\/ul>\n\n\n\n<p>Your system must have JDK installed in order to use Apache Maven on Ubuntu. How to install JDK on Ubuntu is detailed below:<\/p>\n\n\n\n<h3 class=\"wp-block-heading has-accent-color has-text-color\"><span class=\"ez-toc-section\" id=\"Update_the_Package_List\"><\/span>Update the Package List<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Before installing any package, it&#8217;s advisable to update your package list. Use the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>sudo apt update &amp;&amp; apt upgrade -y<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading has-accent-color has-text-color\"><span class=\"ez-toc-section\" id=\"Install_JDK\"><\/span>Install JDK<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Install the default JDK package using the command:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>sudo apt install default-jdk -y<\/code><\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"168\" data-attachment-id=\"3858\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-apache-maven-on-ubuntu\/attachment\/screenshot-2023-09-08-at-12-55-20\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-08-at-12.55.20.png?fit=1468%2C330&amp;ssl=1\" data-orig-size=\"1468,330\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Screenshot-2023-09-08-at-12.55.20\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-08-at-12.55.20.png?fit=750%2C168&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-08-at-12.55.20.png?resize=750%2C168&#038;ssl=1\" alt=\"Install Apache Maven on Ubuntu\" class=\"wp-image-3858\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-08-at-12.55.20.png?resize=1024%2C230&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-08-at-12.55.20.png?resize=300%2C67&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-08-at-12.55.20.png?resize=768%2C173&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-08-at-12.55.20.png?w=1468&amp;ssl=1 1468w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/figure>\n<\/div>\n\n\n<p><\/p>\n\n\n\n<h4 class=\"wp-block-heading has-accent-color has-text-color\"><span class=\"ez-toc-section\" id=\"Verify_Java_Installation\"><\/span>Verify Java Installation<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>To ensure Java is installed correctly, check the installed version:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>java -version<\/code><\/pre>\n\n\n\n<p>The system should display the installed version of Java.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"78\" data-attachment-id=\"3857\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-apache-maven-on-ubuntu\/attachment\/screenshot-2023-09-08-at-13-06-40\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-08-at-13.06.40.png?fit=1277%2C133&amp;ssl=1\" data-orig-size=\"1277,133\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Screenshot-2023-09-08-at-13.06.40\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-08-at-13.06.40.png?fit=750%2C78&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-08-at-13.06.40.png?resize=750%2C78&#038;ssl=1\" alt=\"How to Install Apache Maven on Ubuntu\" class=\"wp-image-3857\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-08-at-13.06.40.png?resize=1024%2C107&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-08-at-13.06.40.png?resize=300%2C31&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-08-at-13.06.40.png?resize=768%2C80&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-08-at-13.06.40.png?w=1277&amp;ssl=1 1277w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/figure>\n<\/div>\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading has-accent-color has-text-color\"><span class=\"ez-toc-section\" id=\"Installing_Apache_Maven_on_Ubuntu\"><\/span>Installing Apache Maven on Ubuntu<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Now, let&#8217;s proceed with Apache Maven&#8217;s installation.<\/p>\n\n\n\n<h4 class=\"wp-block-heading has-accent-color has-text-color\"><span class=\"ez-toc-section\" id=\"Step_1_Download_Apache_Maven\"><\/span>Step 1: Download Apache Maven<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>Go to the official Apache Maven page and copy the URL for the most recent version. Then, download it using the &#8216;wget&#8217; command.<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>wget https:\/\/downloads.apache.org\/maven\/maven-3\/3.9.4\/binaries\/apache-maven-3.9.4-bin.tar.gz<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading has-accent-color has-text-color\"><span class=\"ez-toc-section\" id=\"Step_2_Extract_the_Downloaded_Archive\"><\/span>Step 2: Extract the Downloaded Archive<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>After downloading, use the &#8216;tar&#8217; command to extract the archive:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>tar xzf apache-maven-3.9.4-bin.tar.gz<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading has-accent-color has-text-color\"><span class=\"ez-toc-section\" id=\"Step_3_Move_Apache_Maven\"><\/span>Step 3: Move Apache Maven<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>Move the extracted directory to &#8216;\/opt&#8217; directory, which is used for storing third-party software on Unix systems:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>sudo mv apache-maven-3.9.4 \/opt\/apache-maven<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading has-accent-color has-text-color\"><span class=\"ez-toc-section\" id=\"Step_4_Set_Up_Environment_Variables\"><\/span>Step 4: Set Up Environment Variables<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>Set up the environment variables by editing the &#8216;\/etc\/profile.d\/mavenenv.sh&#8217; file:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>sudo nano \/etc\/profile.d\/mavenenv.sh<\/code><\/pre>\n\n\n\n<p>Add the following lines to the file:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>export M2_HOME=\/opt\/apache-maven\nexport PATH=${M2_HOME}\/bin:${PATH}<\/code><\/pre>\n\n\n\n<p>Save and close the file. Make it executable with the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>sudo chmod +x \/etc\/profile.d\/mavenenv.sh<\/code><\/pre>\n\n\n\n<p>Then, load the environment variables using the source command:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>source \/etc\/profile.d\/mavenenv.sh<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading has-accent-color has-text-color\"><span class=\"ez-toc-section\" id=\"Verifying_Apache_Maven_Installation\"><\/span>Verifying Apache Maven Installation<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>To verify if Apache Maven on Ubuntu is installed correctly, use the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>mvn -version<\/code><\/pre>\n\n\n\n<p>The system should display the installed version of Apache Maven, similar to this:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"95\" data-attachment-id=\"3859\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-apache-maven-on-ubuntu\/attachment\/screenshot-2023-09-08-at-13-27-43\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-08-at-13.27.43.png?fit=1162%2C148&amp;ssl=1\" data-orig-size=\"1162,148\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Screenshot-2023-09-08-at-13.27.43\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-08-at-13.27.43.png?fit=750%2C95&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-08-at-13.27.43.png?resize=750%2C95&#038;ssl=1\" alt=\"Apache Maven on Ubuntu version\" class=\"wp-image-3859\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-08-at-13.27.43.png?resize=1024%2C130&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-08-at-13.27.43.png?resize=300%2C38&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-08-at-13.27.43.png?resize=768%2C98&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-08-at-13.27.43.png?w=1162&amp;ssl=1 1162w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/figure>\n<\/div>\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading has-accent-color has-text-color\"><span class=\"ez-toc-section\" id=\"How_to_use_Apache_Maven_on_Ubuntu\"><\/span>How to use Apache Maven on Ubuntu<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Once you have Apache Maven on Ubuntu installed, you can start using it for your projects. Here are some basic commands and examples to get you started:<\/p>\n\n\n\n<h4 class=\"wp-block-heading has-accent-color has-text-color\"><span class=\"ez-toc-section\" id=\"Creating_a_New_Project\"><\/span>Creating a New Project<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>Maven uses archetypes which are project templates to create new projects. To create a new project, use the\u00a0<code>mvn archetype:generate<\/code>\u00a0command. For example:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false<\/code><\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"176\" data-attachment-id=\"3860\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-apache-maven-on-ubuntu\/attachment\/screenshot-2023-09-08-at-13-33-01\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-08-at-13.33.01.png?fit=1130%2C265&amp;ssl=1\" data-orig-size=\"1130,265\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Screenshot-2023-09-08-at-13.33.01\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-08-at-13.33.01.png?fit=750%2C176&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-08-at-13.33.01.png?resize=750%2C176&#038;ssl=1\" alt=\"Apache Maven on Ubuntu New Project\" class=\"wp-image-3860\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-08-at-13.33.01.png?resize=1024%2C240&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-08-at-13.33.01.png?resize=300%2C70&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-08-at-13.33.01.png?resize=768%2C180&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-08-at-13.33.01.png?w=1130&amp;ssl=1 1130w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/figure>\n<\/div>\n\n\n<p><\/p>\n\n\n\n<h4 class=\"wp-block-heading has-accent-color has-text-color\"><span class=\"ez-toc-section\" id=\"Building_the_Project\"><\/span>Building the Project<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>Navigate to the directory where the\u00a0<code>pom.xml<\/code>\u00a0file of your project is located. You can build the project using the\u00a0<code>mvn package<\/code>\u00a0command:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>cd \/path\/to\/your\/project\nmvn package<\/code><\/pre>\n\n\n\n<p>This command compiles the source code of the project and packages the result into a JAR file.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"112\" data-attachment-id=\"3861\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-apache-maven-on-ubuntu\/attachment\/screenshot-2023-09-08-at-13-36-47\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-08-at-13.36.47.png?fit=881%2C131&amp;ssl=1\" data-orig-size=\"881,131\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Screenshot-2023-09-08-at-13.36.47\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-08-at-13.36.47.png?fit=750%2C112&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-08-at-13.36.47.png?resize=750%2C112&#038;ssl=1\" alt=\"Building the Project on Apache Maven on Ubuntu\" class=\"wp-image-3861\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-08-at-13.36.47.png?w=881&amp;ssl=1 881w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-08-at-13.36.47.png?resize=300%2C45&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-08-at-13.36.47.png?resize=768%2C114&amp;ssl=1 768w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/figure>\n<\/div>\n\n\n<p><\/p>\n\n\n\n<h4 class=\"wp-block-heading has-accent-color has-text-color\"><span class=\"ez-toc-section\" id=\"Running_the_Project\"><\/span>Running the Project<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>If your project is a simple Java application, you can run it using the\u00a0<code>java -cp<\/code>\u00a0command. For example:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>java -cp target\/my-app-1.0-SNAPSHOT.jar com.mycompany.app.App<\/code><\/pre>\n\n\n\n<p>Here,\u00a0<code>com.mycompany.app.App<\/code>\u00a0is the main class defined in your project.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"89\" data-attachment-id=\"3862\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-apache-maven-on-ubuntu\/attachment\/screenshot-2023-09-08-at-13-39-53\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-08-at-13.39.53.png?fit=764%2C91&amp;ssl=1\" data-orig-size=\"764,91\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Screenshot-2023-09-08-at-13.39.53\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-08-at-13.39.53.png?fit=750%2C89&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-08-at-13.39.53.png?resize=750%2C89&#038;ssl=1\" alt=\"Running the Project Apache Maven on Ubuntu\" class=\"wp-image-3862\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-08-at-13.39.53.png?w=764&amp;ssl=1 764w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-08-at-13.39.53.png?resize=300%2C36&amp;ssl=1 300w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/figure>\n<\/div>\n\n\n<h4 class=\"wp-block-heading has-accent-color has-text-color\"><span class=\"ez-toc-section\" id=\"Checking_the_Status\"><\/span>Checking the Status<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>Maven does not have a built-in command to check the status of a project. However, you can use the\u00a0<code>mvn validate<\/code>\u00a0command to check if the project is correct and all necessary information is available. This command also validates if the project is structured correctly.<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>mvn validate<\/code><\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"196\" data-attachment-id=\"3863\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-apache-maven-on-ubuntu\/attachment\/screenshot-2023-09-08-at-13-43-02\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-08-at-13.43.02.png?fit=952%2C249&amp;ssl=1\" data-orig-size=\"952,249\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Screenshot-2023-09-08-at-13.43.02\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-08-at-13.43.02.png?fit=750%2C196&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-08-at-13.43.02.png?resize=750%2C196&#038;ssl=1\" alt=\"Checking the Status Apache Maven on Ubuntu\" class=\"wp-image-3863\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-08-at-13.43.02.png?w=952&amp;ssl=1 952w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-08-at-13.43.02.png?resize=300%2C78&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-08-at-13.43.02.png?resize=768%2C201&amp;ssl=1 768w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/figure>\n<\/div>\n\n\n<p><\/p>\n\n\n\n<h4 class=\"wp-block-heading has-accent-color has-text-color\"><span class=\"ez-toc-section\" id=\"Cleaning_the_Project\"><\/span>Cleaning the Project<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>The\u00a0<code>mvn clean<\/code>\u00a0command cleans the project and removes all files generated by the previous build:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>mvn clean<\/code><\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"256\" data-attachment-id=\"3864\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-apache-maven-on-ubuntu\/attachment\/screenshot-2023-09-08-at-13-45-24\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-08-at-13.45.24.png?fit=898%2C307&amp;ssl=1\" data-orig-size=\"898,307\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Screenshot-2023-09-08-at-13.45.24\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-08-at-13.45.24.png?fit=750%2C256&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-08-at-13.45.24.png?resize=750%2C256&#038;ssl=1\" alt=\"Cleaning the Project Apache Maven on Ubuntu\" class=\"wp-image-3864\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-08-at-13.45.24.png?w=898&amp;ssl=1 898w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-08-at-13.45.24.png?resize=300%2C103&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-08-at-13.45.24.png?resize=768%2C263&amp;ssl=1 768w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/figure>\n<\/div>\n\n\n<p><\/p>\n\n\n\n<h4 class=\"wp-block-heading has-accent-color has-text-color\"><span class=\"ez-toc-section\" id=\"Testing_the_Project\"><\/span>Testing the Project<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>Maven can also run tests using the\u00a0<code>mvn test<\/code>\u00a0command:<\/p>\n\n\n\n<p>This command executes the unit tests of the project using the testing framework you have configured.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"192\" data-attachment-id=\"3865\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-apache-maven-on-ubuntu\/attachment\/screenshot-2023-09-08-at-13-46-47\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-08-at-13.46.47.png?fit=1066%2C273&amp;ssl=1\" data-orig-size=\"1066,273\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Screenshot-2023-09-08-at-13.46.47\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-08-at-13.46.47.png?fit=750%2C192&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-08-at-13.46.47.png?resize=750%2C192&#038;ssl=1\" alt=\"Testing the Project Apache Maven on Ubuntu\" class=\"wp-image-3865\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-08-at-13.46.47.png?resize=1024%2C262&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-08-at-13.46.47.png?resize=300%2C77&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-08-at-13.46.47.png?resize=768%2C197&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/Screenshot-2023-09-08-at-13.46.47.png?w=1066&amp;ssl=1 1066w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/figure>\n<\/div>\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading has-accent-color has-text-color\"><span class=\"ez-toc-section\" id=\"Final_Thoughts\"><\/span>Final Thoughts<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Congratulations! Apache Maven on Ubuntu is now properly installed. The procedure may appear difficult at first, but with practice it becomes simple. You can now use Apache Maven to better manage and understand your software projects.<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This tutorial aims to provide a detailed, step-by-step guide on how to install Apache Maven on Ubuntu, a popular open-source operating system. In the realm of software development, Apache Maven stands as a robust project management tool, widely embraced for its ability to handle project builds, reporting, and documentation from<\/p>\n","protected":false},"author":8,"featured_media":3868,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[3],"tags":[747,749,744,748,746,477,745],"class_list":["post-3856","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorial-how-to","tag-apache-maven-installation-guide","tag-apache-maven-jdk","tag-apache-maven-on-ubuntu","tag-apache-maven-project-management","tag-apache-maven-software-development","tag-install-apache-maven","tag-install-apache-maven-ubuntu"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/How-to-Install-Apache-Maven-on-Ubuntu-22.png?fit=360%2C240&ssl=1","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p7ISfL-10c","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":3472,"url":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-apache-maven-on-centos-7\/","url_meta":{"origin":3856,"position":0},"title":"How to install Apache Maven on CentOS 7","author":"George B.","date":"June 8, 2023","format":false,"excerpt":"We will walk you through the process of installing Apache Maven on CentOS Linux. We will cover the installation of the necessary packages, configuring the environment variables, and demonstrate how to build projects using Maven. Apache Maven is a powerful build automation tool that plays a crucial role in managing\u2026","rel":"","context":"In &quot;Tutorials&quot;","block_context":{"text":"Tutorials","link":"https:\/\/www.virtono.com\/community\/category\/tutorial-how-to\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/06\/How-to-install-Apache-Maven-on-CentOS-7.png?fit=600%2C330&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/06\/How-to-install-Apache-Maven-on-CentOS-7.png?fit=600%2C330&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/06\/How-to-install-Apache-Maven-on-CentOS-7.png?fit=600%2C330&ssl=1&resize=525%2C300 1.5x"},"classes":[]},{"id":2897,"url":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-apache-on-ubuntu-20-04%ef%bf%bc\/","url_meta":{"origin":3856,"position":1},"title":"How To Install Apache on\u00a0Ubuntu 20.04\ufffc","author":"George B.","date":"July 21, 2022","format":false,"excerpt":"What is Apache HTTP? The Apache HTTP Server is a free and open-source cross-platform web server software, released under the terms of Apache License 2.0. Apache is developed and maintained by an open community of developers under the auspices of the Apache Software Foundation.\u00a0 Step 1 - Updating the system\u2026","rel":"","context":"In &quot;Tutorials&quot;","block_context":{"text":"Tutorials","link":"https:\/\/www.virtono.com\/community\/category\/tutorial-how-to\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2022\/07\/what-is-apache-1.png?fit=1200%2C600&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2022\/07\/what-is-apache-1.png?fit=1200%2C600&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2022\/07\/what-is-apache-1.png?fit=1200%2C600&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2022\/07\/what-is-apache-1.png?fit=1200%2C600&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2022\/07\/what-is-apache-1.png?fit=1200%2C600&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":3438,"url":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-apache-spark-on-ubuntu-22-04-and-centos\/","url_meta":{"origin":3856,"position":2},"title":"How to install Apache Spark on Ubuntu 22.04 and CentOS","author":"George B.","date":"June 1, 2023","format":false,"excerpt":"We will guide you through the process of installing Apache Spark on Ubuntu 22.04, 20.04, and CentOS, ensuring you have all the necessary tools to leverage this incredible technology. Apache Spark is a powerful open-source framework for distributed computing that has become a go-to solution for big data processing. With\u2026","rel":"","context":"In &quot;Tutorials&quot;","block_context":{"text":"Tutorials","link":"https:\/\/www.virtono.com\/community\/category\/tutorial-how-to\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/05\/How-to-install-Apache-Spark-on-Ubuntu-22.04-and-CentOS.png?fit=600%2C330&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/05\/How-to-install-Apache-Spark-on-Ubuntu-22.04-and-CentOS.png?fit=600%2C330&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/05\/How-to-install-Apache-Spark-on-Ubuntu-22.04-and-CentOS.png?fit=600%2C330&ssl=1&resize=525%2C300 1.5x"},"classes":[]},{"id":3407,"url":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-apache-kafka-on-ubuntu-22-04\/","url_meta":{"origin":3856,"position":3},"title":"How to Install Apache Kafka on Ubuntu 22.04","author":"George B.","date":"May 27, 2023","format":false,"excerpt":"In this tutorial, we will walk you through the step-by-step process of installing Apache Kafka on Ubuntu 22.04, enabling you to leverage its powerful features for your data streaming needs. Apache Kafka is an open-source distributed event streaming platform that allows you to build real-time data pipelines and streaming applications.\u2026","rel":"","context":"In &quot;Tutorials&quot;","block_context":{"text":"Tutorials","link":"https:\/\/www.virtono.com\/community\/category\/tutorial-how-to\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/05\/How-to-Install-Apache-Kafka-on-Ubuntu-22.04.png?fit=600%2C330&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/05\/How-to-Install-Apache-Kafka-on-Ubuntu-22.04.png?fit=600%2C330&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/05\/How-to-Install-Apache-Kafka-on-Ubuntu-22.04.png?fit=600%2C330&ssl=1&resize=525%2C300 1.5x"},"classes":[]},{"id":3801,"url":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-apache-hadoop-on-ubuntu-22-04\/","url_meta":{"origin":3856,"position":4},"title":"How to Install Apache Hadoop on Ubuntu 22.04","author":"George B.","date":"September 4, 2023","format":false,"excerpt":"In today's digital age, the ability to process and analyze large data sets is crucial for businesses to stay competitive. Apache Hadoop, an open-source software framework, is a powerful tool that allows for distributed processing of large data sets across clusters of computers. This article will guide you through the\u2026","rel":"","context":"In &quot;Tutorials&quot;","block_context":{"text":"Tutorials","link":"https:\/\/www.virtono.com\/community\/category\/tutorial-how-to\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/How-to-Install-Apache-Hadoop-on-Ubuntu.png?fit=360%2C240&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":2976,"url":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/setup-linux-apache-mysql-phplamp-ubuntu-20-04\/","url_meta":{"origin":3856,"position":5},"title":"Setup Linux Apache MySQL PHP(LAMP) &#8211; Ubuntu 20.04","author":"George B.","date":"August 5, 2022","format":false,"excerpt":"What is LAMP? LAMP (Linux, Apache, MySQL, PHP\/Perl\/Python) is an acronym that refers to one of the most widely used software stacks for many of the web's most popular applications. Step 1 - Update\/Upgrade your package index sudo apt update sudo apt upgrade Step 2 - Install Apache apt-get install\u2026","rel":"","context":"In &quot;Tutorials&quot;","block_context":{"text":"Tutorials","link":"https:\/\/www.virtono.com\/community\/category\/tutorial-how-to\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2022\/08\/lamp_stack.webp?fit=800%2C432&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2022\/08\/lamp_stack.webp?fit=800%2C432&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2022\/08\/lamp_stack.webp?fit=800%2C432&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2022\/08\/lamp_stack.webp?fit=800%2C432&ssl=1&resize=700%2C400 2x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/posts\/3856","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/comments?post=3856"}],"version-history":[{"count":2,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/posts\/3856\/revisions"}],"predecessor-version":[{"id":3869,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/posts\/3856\/revisions\/3869"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/media\/3868"}],"wp:attachment":[{"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/media?parent=3856"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/categories?post=3856"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/tags?post=3856"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}