<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>maven Archives - Linux Windows and android Tutorials</title>
	<atom:link href="https://www.osradar.com/tag/maven/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.osradar.com</link>
	<description>tutorials and news and Seurity</description>
	<lastBuildDate>Sat, 16 May 2020 03:50:45 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.8.13</generator>
	<item>
		<title>How to install Apache Maven on Ubuntu 20.04?</title>
		<link>https://www.osradar.com/install-apache-maven-ubuntu-20-04/</link>
					<comments>https://www.osradar.com/install-apache-maven-ubuntu-20-04/#respond</comments>
		
		<dc:creator><![CDATA[angeloma]]></dc:creator>
		<pubDate>Fri, 15 May 2020 22:45:00 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[focal]]></category>
		<category><![CDATA[Focal Fossa]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[maven]]></category>
		<category><![CDATA[Tutorial]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=20319</guid>

					<description><![CDATA[<p>Java is still one of the most practical languages used by many developers. This is thanks to the fact that it continues to accomplish everything it is asked to do. Despite this, other tools are also required to help speed up the process of development and compilation of the project. Today I&#8217;ll show you how [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/install-apache-maven-ubuntu-20-04/">How to install Apache Maven on Ubuntu 20.04?</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Java is still one of the most practical languages used by many developers. This is thanks to the fact that it continues to accomplish everything it is asked to do. Despite this, other tools are also required to help speed up the process of development and compilation of the project. Today I&#8217;ll show you how to install a tool that will help you a lot. Today I will teach you how to install Apache Maven on Ubuntu 20.04</p>



<p>To manage projects done in Java, there is no better tool than&nbsp;<a target="_blank" href="https://maven.apache.org/" rel="noreferrer noopener">Apache Maven</a>. This fantastic tool, belonging to the Apache foundation, comes with predefined objectives to perform certain clearly defined tasks, such as code compilation and packaging.</p>



<p>Many features make Maven a great tool. However, the key is that Maven is ready for network use. Also, its functions are made extensible by the ability to install plugins. Finally, Maven relies on the Project Object Model (POM) to describe the project, as well as its dependencies for later deployment.</p>



<h2>Installing Apache Maven on Ubuntu 20.04</h2>



<p>Before starting the installation of Apache Maven, it is advisable to perform a complete update to the operating system.</p>



<p>So, open a terminal or connect via SSH to your server:</p>



<pre class="wp-block-preformatted">:~$ sudo apt update
:~$ sudo apt upgrade</pre>



<p>Once all the packages have been installed without problems, we can start.</p>



<h3>1.- Install Java on Ubuntu 20.04</h3>



<p>Apache Maven is created in Java, so the operating system where it is going to be installed has to have Java. This, in Ubuntu 20.04 is not a problem.</p>



<p>To install Java you can execute the following command:</p>



<pre class="wp-block-preformatted">:~$ sudo apt install openjdk-11-jre openjdk-11-jdk
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following additional packages will be installed:
at-spi2-core ca-certificates-java fonts-dejavu-extra java-common libatk-bridge2.0-0 libatk-wrapper-java libatk-wrapper-java-jni libatk1.0-0 libatk1.0-data
libatspi2.0-0 libdrm-amdgpu1 libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libfontenc1 libgif7 libgl1 libgl1-mesa-dri libglapi-mesa libglvnd0 libglx-mesa0 libglx0
libice-dev libice6 libllvm9 libnspr4 libnss3 libpciaccess0 libpcsclite1 libpthread-stubs0-dev libsensors-config libsensors5 libsm-dev libsm6 libvulkan1
libwayland-client0 libx11-dev libx11-xcb1 libxau-dev libxaw7 libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0 libxcb-present0 libxcb-randr0 libxcb-shape0 libxcb-sync1
libxcb1-dev libxcomposite1 libxdamage1 libxdmcp-dev libxfixes3 libxft2 libxi6 libxinerama1 libxkbfile1 libxmu6 libxrandr2 libxrender1 libxshmfence1 libxt-dev libxt6
libxtst6 libxv1 libxxf86dga1 libxxf86vm1 mesa-vulkan-drivers openjdk-11-jdk-headless openjdk-11-jre-headless x11-common x11-utils x11proto-core-dev x11proto-dev
xorg-sgml-doctools xtrans-dev
Suggested packages:
default-jre libice-doc pcscd lm-sensors libsm-doc libx11-doc libxcb-doc libxt-doc openjdk-11-demo openjdk-11-source visualvm libnss-mdns fonts-ipafont-gothic
fonts-ipafont-mincho fonts-wqy-microhei | fonts-wqy-zenhei fonts-indic mesa-utils
The following NEW packages will be installed:
at-spi2-core ca-certificates-java fonts-dejavu-extra java-common libatk-bridge2.0-0 libatk-wrapper-java libatk-wrapper-java-jni libatk1.0-0 libatk1.0-data
libatspi2.0-0 libdrm-amdgpu1 libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libfontenc1 libgif7 libgl1 libgl1-mesa-dri libglapi-mesa libglvnd0 libglx-mesa0 libglx0
libice-dev libice6 libllvm9 libnspr4 libnss3 libpciaccess0 libpcsclite1 libpthread-stubs0-dev libsensors-config libsensors5 libsm-dev libsm6 libvulkan1
libwayland-client0 libx11-dev libx11-xcb1 libxau-dev libxaw7 libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0 libxcb-present0 libxcb-randr0 libxcb-shape0 libxcb-sync1
libxcb1-dev libxcomposite1 libxdamage1 libxdmcp-dev libxfixes3 libxft2 libxi6 libxinerama1 libxkbfile1 libxmu6 libxrandr2 libxrender1 libxshmfence1 libxt-dev libxt6
libxtst6 libxv1 libxxf86dga1 libxxf86vm1 mesa-vulkan-drivers openjdk-11-jdk openjdk-11-jdk-headless openjdk-11-jre openjdk-11-jre-headless x11-common x11-utils
x11proto-core-dev x11proto-dev xorg-sgml-doctools xtrans-dev
0 upgraded, 77 newly installed, 0 to remove and 0 not upgraded.
Need to get 294 MB of archives.
After this operation, 789 MB of additional disk space will be used.
Do you want to continue? [Y/n]</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="380" src="https://www.osradar.com/wp-content/uploads/2020/05/1-10-1024x380.png" alt="1.- Install Java on Ubuntu 20.04" class="wp-image-20367" srcset="https://www.osradar.com/wp-content/uploads/2020/05/1-10-1024x380.png 1024w, https://www.osradar.com/wp-content/uploads/2020/05/1-10-300x111.png 300w, https://www.osradar.com/wp-content/uploads/2020/05/1-10-768x285.png 768w, https://www.osradar.com/wp-content/uploads/2020/05/1-10-696x258.png 696w, https://www.osradar.com/wp-content/uploads/2020/05/1-10-1068x396.png 1068w, https://www.osradar.com/wp-content/uploads/2020/05/1-10.png 1365w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>1.- Install Java on Ubuntu 20.04</figcaption></figure>



<p>This will install Java version 11, which is LTS, and already comes in the official repositories of the distribution.</p>



<p>If you want to install Java version 14, you can do it through <a href="https://www.osradar.com/how-to-install-oracle-java-14-on-ubuntu-20-04/" target="_blank" rel="noreferrer noopener">this</a> tutorial.</p>



<p>Now, verify that Java has been installed correctly, executing the Java command, for example, to know the version installed:</p>



<pre class="wp-block-preformatted">:~$ java --version
openjdk 11.0.7 2020-04-14
OpenJDK Runtime Environment (build 11.0.7+10-post-Ubuntu-3ubuntu1)
OpenJDK 64-Bit Server VM (build 11.0.7+10-post-Ubuntu-3ubuntu1, mixed mode, sharing)</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="802" height="131" src="https://www.osradar.com/wp-content/uploads/2020/05/2-13.png" alt="2.- Java installed" class="wp-image-20368" srcset="https://www.osradar.com/wp-content/uploads/2020/05/2-13.png 802w, https://www.osradar.com/wp-content/uploads/2020/05/2-13-300x49.png 300w, https://www.osradar.com/wp-content/uploads/2020/05/2-13-768x125.png 768w, https://www.osradar.com/wp-content/uploads/2020/05/2-13-696x114.png 696w" sizes="(max-width: 802px) 100vw, 802px" /><figcaption>2.- Java installed</figcaption></figure>



<p>This indicates that Java has been installed and is working properly.</p>



<h3>2.- Download, install and test Apache Maven on Ubuntu 20.04</h3>



<p>Now we can download Apache Maven from one of the Apache mirrors. We do this intending to get the latest stable version and thus take better advantage of the features offered.</p>



<p>So, go to the <code>/tmp</code> directory from there with the help of the<a href="https://www.osradar.com/the-wget-command/" target="_blank" rel="noreferrer noopener"> wget command</a> and download.</p>



<pre class="wp-block-preformatted">:~$ cd /tmp/
:~$ wget -c http://mirrors.advancedhosters.com/apache/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz
--2020-05-14 05:15:57-- http://mirrors.advancedhosters.com/apache/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz
Resolving mirrors.advancedhosters.com (mirrors.advancedhosters.com)… 213.174.147.249, 2a02:b48:6:1::2
Connecting to mirrors.advancedhosters.com (mirrors.advancedhosters.com)|213.174.147.249|:80… connected.
HTTP request sent, awaiting response… 200 OK
Length: 9506321 (9.1M) [application/octet-stream]
Saving to: ‘apache-maven-3.6.3-bin.tar.gz’
apache-maven-3.6.3-bin.tar.gz 100%[=====================================================================================&gt;] 9.07M 1.03MB/s in 9.3s
2020-05-14 05:16:07 (1001 KB/s) - ‘apache-maven-3.6.3-bin.tar.gz’ saved [9506321/9506321]</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="207" src="https://www.osradar.com/wp-content/uploads/2020/05/3-11-1024x207.png" alt="3.- Downloading Apache Maven on Ubuntu 20.04" class="wp-image-20370" srcset="https://www.osradar.com/wp-content/uploads/2020/05/3-11-1024x207.png 1024w, https://www.osradar.com/wp-content/uploads/2020/05/3-11-300x61.png 300w, https://www.osradar.com/wp-content/uploads/2020/05/3-11-768x156.png 768w, https://www.osradar.com/wp-content/uploads/2020/05/3-11-696x141.png 696w, https://www.osradar.com/wp-content/uploads/2020/05/3-11-1068x216.png 1068w, https://www.osradar.com/wp-content/uploads/2020/05/3-11.png 1343w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>3.- Downloading Apache Maven on Ubuntu 20.04</figcaption></figure>



<p>At the moment, the last stable version of Apache Maven is 3.6.3</p>



<p>Then, decompress the file and move it to <code>/opt/</code></p>



<pre class="wp-block-preformatted">:~$ tar -zxvf apache-maven-3.6.3-bin.tar.gz<br>:~$ sudo mv apache-maven-3.6.3 /opt/maven</pre>



<p>And to make Apache Maven available from anywhere on the prompt, a new file has to be created within the bash profile.</p>



<pre class="wp-block-preformatted">:~$ sudo nano /etc/profile.d/maven.sh</pre>



<p>And add the following:</p>



<pre class="wp-block-preformatted">export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64<br>export M2_HOME=/opt/maven<br>export PATH=${M2_HOME}/bin:${PATH}</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="900" height="175" src="https://www.osradar.com/wp-content/uploads/2020/05/4-9.png" alt="4.- Making Apache Maven available from the terminal" class="wp-image-20369" srcset="https://www.osradar.com/wp-content/uploads/2020/05/4-9.png 900w, https://www.osradar.com/wp-content/uploads/2020/05/4-9-300x58.png 300w, https://www.osradar.com/wp-content/uploads/2020/05/4-9-768x149.png 768w, https://www.osradar.com/wp-content/uploads/2020/05/4-9-696x135.png 696w" sizes="(max-width: 900px) 100vw, 900px" /><figcaption>4.- Making Apache Maven available from the terminal</figcaption></figure>



<p>Save the changes and close the file.</p>



<p>Apply the changes by running this command:</p>



<pre class="wp-block-preformatted">:~$ source /etc/profile.d/maven.sh</pre>



<p>Finally, to test Apache Maven, just show the installed version.</p>



<pre class="wp-block-preformatted">:~$ mvn -version
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: /opt/maven
Java version: 11.0.7, vendor: Ubuntu, runtime: /usr/lib/jvm/java-11-openjdk-amd64
Default locale: en, platform encoding: UTF-8
OS name: "linux", version: "5.4.0-26-generic", arch: "amd64", family: "unix"</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="856" height="167" src="https://www.osradar.com/wp-content/uploads/2020/05/5-5.png" alt="5.- Testing Apache Maven on Ubuntu 20.04" class="wp-image-20372" srcset="https://www.osradar.com/wp-content/uploads/2020/05/5-5.png 856w, https://www.osradar.com/wp-content/uploads/2020/05/5-5-300x59.png 300w, https://www.osradar.com/wp-content/uploads/2020/05/5-5-768x150.png 768w, https://www.osradar.com/wp-content/uploads/2020/05/5-5-696x136.png 696w" sizes="(max-width: 856px) 100vw, 856px" /><figcaption>5.- Testing Apache Maven on Ubuntu 20.04</figcaption></figure>



<p>So, enjoy it  because it is properly installed.</p>



<h2>Conclusion</h2>



<p>Apache Maven is a very important tool in the development of projects, especially if they are Java. Its installation is not difficult but its benefits are many.</p>



<p>Please share this post with your friends, join <a href="https://t.me/osradar" target="_blank" rel="noreferrer noopener">our Telegram Channel</a> and buy us a coffee.</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/install-apache-maven-ubuntu-20-04/">How to install Apache Maven on Ubuntu 20.04?</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/install-apache-maven-ubuntu-20-04/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to install Maven in Windows 10/Server</title>
		<link>https://www.osradar.com/how-to-install-maven-in-windows-10-server/</link>
					<comments>https://www.osradar.com/how-to-install-maven-in-windows-10-server/#respond</comments>
		
		<dc:creator><![CDATA[roger]]></dc:creator>
		<pubDate>Tue, 12 Nov 2019 21:28:53 +0000</pubDate>
				<category><![CDATA[Applications]]></category>
		<category><![CDATA[Desktop]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Servers]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Apache maven]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[maven]]></category>
		<category><![CDATA[Windows 10]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=15574</guid>

					<description><![CDATA[<p>Hello, how are you? Let&#8217;s talk about Maven. This is a software tool for the management and construction of Java projects. It has the ability to perform tasks such as code compilation and packaging. In other words, it makes it possible to create software with dependencies included within the JAR structure. However, the key feature [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-install-maven-in-windows-10-server/">How to install Maven in Windows 10/Server</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p> Hello, how are you? Let&#8217;s talk about Maven. This is a software tool for the management and construction of Java projects. It has the ability to perform tasks such as code compilation and packaging. In other words, it makes it possible to create software with dependencies included within the JAR structure. However, the key feature of Maven is that it is network ready. The engine included in its kernel can dynamically download plugins from a repository. This repository provides access to many versions of different Open Source projects in Java, from Apache and other organizations and developers. In this post, we will see how to install Maven in Windows 10/Server.</p>



<h2>Prerequisite</h2>



<p>To be able to run Maven it is imperative to have Java JDK configured. To see how to download and install it, please check our post about <a href="https://www.osradar.com/how-to-install-apache-tomcat-on-windows-server-2019/" target="_blank" rel="noreferrer noopener" aria-label="Tomcat (opens in a new tab)">Tomcat</a> in Windows 10/Server.</p>



<h2>Download Maven.</h2>



<p>The first thing you have to do is download the latest version of Apache Maven. With this in mind, go to your page and select the binary files in ZIP format. At the time of writing this article, the version is 3.6.2</p>



<figure class="wp-block-image"><img loading="lazy" width="1024" height="730" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2019/11/maven-1024x730.jpg" alt="Download the latest version of Maven" class="wp-image-15576" srcset="https://www.osradar.com/wp-content/uploads/2019/11/maven.jpg 1024w, https://www.osradar.com/wp-content/uploads/2019/11/maven-300x214.jpg 300w, https://www.osradar.com/wp-content/uploads/2019/11/maven-768x548.jpg 768w, https://www.osradar.com/wp-content/uploads/2019/11/maven-100x70.jpg 100w, https://www.osradar.com/wp-content/uploads/2019/11/maven-696x496.jpg 696w, https://www.osradar.com/wp-content/uploads/2019/11/maven-589x420.jpg 589w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>Download the latest version of Maven</figcaption></figure>



<p>Once downloaded the file, unzip it in the location you want. However, I recommend you to do it at the root of the C unit.</p>



<figure class="wp-block-image"><img loading="lazy" width="1024" height="728" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2019/11/maven7-1024x728.jpg" alt="Apache Maven unzipped in the root of unit C" class="wp-image-15578" srcset="https://www.osradar.com/wp-content/uploads/2019/11/maven7.jpg 1024w, https://www.osradar.com/wp-content/uploads/2019/11/maven7-300x213.jpg 300w, https://www.osradar.com/wp-content/uploads/2019/11/maven7-768x546.jpg 768w, https://www.osradar.com/wp-content/uploads/2019/11/maven7-100x70.jpg 100w, https://www.osradar.com/wp-content/uploads/2019/11/maven7-696x495.jpg 696w, https://www.osradar.com/wp-content/uploads/2019/11/maven7-591x420.jpg 591w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>Apache Maven unzipped in the root of unit C</figcaption></figure>



<h2>Creates environment variables.</h2>



<p>Once the folder has been downloaded and unzipped, all that remains is to add environment variables. Please remember that Maven runs through the CMD. In that case, it is necessary to add the environment variable to run the program from any Command Prompt. Otherwise, we would have to go to the location where the program is decompressed every time you want to run it. If you want to know how to do it please check our post about <a rel="noreferrer noopener" aria-label="Wget  (opens in a new tab)" href="https://www.osradar.com/how-to-install-wget-in-windows-10/" target="_blank">Wget </a>in Windows 10. First, add a name variable MD_HOME and use as the value of the variable the location where you unzipped the binary.</p>



<figure class="wp-block-image"><img loading="lazy" width="1024" height="732" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2019/11/maven6-1024x732.jpg" alt="Creating the M2_HOME variable" class="wp-image-15580" srcset="https://www.osradar.com/wp-content/uploads/2019/11/maven6.jpg 1024w, https://www.osradar.com/wp-content/uploads/2019/11/maven6-300x214.jpg 300w, https://www.osradar.com/wp-content/uploads/2019/11/maven6-768x549.jpg 768w, https://www.osradar.com/wp-content/uploads/2019/11/maven6-100x70.jpg 100w, https://www.osradar.com/wp-content/uploads/2019/11/maven6-696x498.jpg 696w, https://www.osradar.com/wp-content/uploads/2019/11/maven6-588x420.jpg 588w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>Creating the M2_HOME variable</figcaption></figure>



<p>Then edit the Path variable and add a new value with the following address: <strong>C:\apache-maven-3.6.2\bin</strong></p>



<figure class="wp-block-image"><img loading="lazy" width="1024" height="730" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2019/11/maven8-1024x730.jpg" alt="Editing the Path variable." class="wp-image-15582" srcset="https://www.osradar.com/wp-content/uploads/2019/11/maven8.jpg 1024w, https://www.osradar.com/wp-content/uploads/2019/11/maven8-300x214.jpg 300w, https://www.osradar.com/wp-content/uploads/2019/11/maven8-768x548.jpg 768w, https://www.osradar.com/wp-content/uploads/2019/11/maven8-100x70.jpg 100w, https://www.osradar.com/wp-content/uploads/2019/11/maven8-696x496.jpg 696w, https://www.osradar.com/wp-content/uploads/2019/11/maven8-589x420.jpg 589w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>Editing the Path variable.</figcaption></figure>



<h2>Testing Maven.</h2>



<p>Now all that remains is to prove that everything is in order and Maven runs successfully. With this intention open a CMD and type the following command:</p>



<pre class="wp-block-preformatted">mvn-v</pre>



<figure class="wp-block-image"><img loading="lazy" width="1024" height="728" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2019/11/maven9-1024x728.jpg" alt="Maven running on Windows 10" class="wp-image-15585" srcset="https://www.osradar.com/wp-content/uploads/2019/11/maven9.jpg 1024w, https://www.osradar.com/wp-content/uploads/2019/11/maven9-300x213.jpg 300w, https://www.osradar.com/wp-content/uploads/2019/11/maven9-768x546.jpg 768w, https://www.osradar.com/wp-content/uploads/2019/11/maven9-100x70.jpg 100w, https://www.osradar.com/wp-content/uploads/2019/11/maven9-696x495.jpg 696w, https://www.osradar.com/wp-content/uploads/2019/11/maven9-591x420.jpg 591w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>Maven running on Windows 10</figcaption></figure>



<p>If running the command gives a result like the previous one, then the installation was successful, and we are now ready to use this tool. Very well we have seen how to install Maven in Windows 10/Server. From now on you can take advantage of all the advantages it offers. For example to manage and build Java projects. This is all for the moment, see you soon.</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-install-maven-in-windows-10-server/">How to install Maven in Windows 10/Server</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/how-to-install-maven-in-windows-10-server/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to install Apache Maven on Debian 10?</title>
		<link>https://www.osradar.com/install-apache-maven-debian-10/</link>
					<comments>https://www.osradar.com/install-apache-maven-debian-10/#respond</comments>
		
		<dc:creator><![CDATA[angeloma]]></dc:creator>
		<pubDate>Fri, 08 Nov 2019 02:10:54 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Apache maven]]></category>
		<category><![CDATA[Buster]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[maven]]></category>
		<category><![CDATA[Tutorial]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=15230</guid>

					<description><![CDATA[<p>In this post, we will show you how to install Apache Maven on Debian 10. To manage projects done in Java, there is no better tool than Apache Maven. This fantastic tool, belonging to the Apache foundation, comes with predefined objectives to perform certain clearly defined tasks, such as code compilation and packaging. There are [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/install-apache-maven-debian-10/">How to install Apache Maven on Debian 10?</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>In this post, we will show you how to install Apache Maven on Debian 10.</p>
<p>To manage projects done in Java, there is no better tool than <a href="https://maven.apache.org/" rel="noopener">Apache Maven</a>. This fantastic tool, belonging to the Apache foundation, comes with predefined objectives to perform certain clearly defined tasks, such as code compilation and packaging.</p>
<p>There are many features that make Maven a great tool. However, the key is that Maven is ready for network use. In addition, its functions are made extensible by the ability to install plugins. Finally, Maven relies on the Project Object Model (POM) to describe the project, as well as its dependencies for later deployment.</p>
<p>If you want to learn how to install Apache Maven on Ubuntu 18.04 or Debian 9, you can read our tutorial:</p>
<p><a href="https://www.osradar.com/install-apache-maven-ubuntu-18-04-debian-9/" target="_blank" rel="noopener noreferrer">How to install Apache Maven on Ubuntu 18.04 / Debian 9?</a></p>
<p>So, let’s start to install Apache Maven.</p>
<h2>Installing Apache Maven on Debian 10</h2>
<p>Before starting it is advisable to make an update to the whole system. To do this, open a terminal session and run the following:</p>
<pre>:~$ sudo apt update &amp;&amp; sudo apt upgrade</pre>
<p>In case your Debian system does not have sudo active, you can learn how to activate it with the following post:</p>
<p><a href="https://www.osradar.com/how-to-enable-sudo-on-debian-10/" target="_blank" rel="noopener noreferrer">How to enable sudo in Debian 10?</a></p>
<p>Now with the updated system you will have at your disposal the last patches to be guaranteed and thus you will have a more stable system.</p>
<h3>Install Java on Debian 10</h3>
<p>Apache Mave is built in JAva, so it requires it to be installed on the system. You can choose between the proprietary version of Oracle or OpenJDK that comes in the Debian repositories. We will use this last option.</p>
<pre>:~$ sudo apt install openjdk-11-jre openjdk-11-jdk</pre>
<p><figure id="attachment_15317" aria-describedby="caption-attachment-15317" style="width: 1365px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-15317" src="https://www.osradar.com/wp-content/uploads/2019/11/1-1.png" alt="1.- Installing Java on Debian 10" width="1365" height="516" srcset="https://www.osradar.com/wp-content/uploads/2019/11/1-1.png 1365w, https://www.osradar.com/wp-content/uploads/2019/11/1-1-300x113.png 300w, https://www.osradar.com/wp-content/uploads/2019/11/1-1-768x290.png 768w, https://www.osradar.com/wp-content/uploads/2019/11/1-1-1024x387.png 1024w, https://www.osradar.com/wp-content/uploads/2019/11/1-1-696x263.png 696w, https://www.osradar.com/wp-content/uploads/2019/11/1-1-1068x404.png 1068w, https://www.osradar.com/wp-content/uploads/2019/11/1-1-1111x420.png 1111w" sizes="(max-width: 1365px) 100vw, 1365px" /><figcaption id="caption-attachment-15317" class="wp-caption-text">1.- Installing Java on Debian 10</figcaption></figure></p>
<p>After finishing the installation, we check that everything is OK showing the installed version of Java.</p>
<pre>:~$ java --version</pre>
<p><figure id="attachment_15318" aria-describedby="caption-attachment-15318" style="width: 749px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-15318" src="https://www.osradar.com/wp-content/uploads/2019/11/2-1.png" alt="2.- Java version" width="749" height="124" srcset="https://www.osradar.com/wp-content/uploads/2019/11/2-1.png 749w, https://www.osradar.com/wp-content/uploads/2019/11/2-1-300x50.png 300w, https://www.osradar.com/wp-content/uploads/2019/11/2-1-696x115.png 696w, https://www.osradar.com/wp-content/uploads/2019/11/2-1-741x124.png 741w" sizes="(max-width: 749px) 100vw, 749px" /><figcaption id="caption-attachment-15318" class="wp-caption-text">2.- Java version</figcaption></figure></p>
<p>So, everything&#8217;s right for now.</p>
<h3>Install Maven. Method 1: Using the official repositories</h3>
<p>Apache Maven is included in the official Debian 10 Buster repositories. However, this version is not the latest available. Then, we will not be able to get the latest application updates.</p>
<p>So to install it, on the terminal, run the following:</p>
<pre>:~$ sudo apt install maven</pre>
<p>That is it. It is the easiest method but we will always be outdated and it is not convenient. So I will show you a way to install the latest version available.</p>
<h3>Method 2: Download it and install it</h3>
<p>The second method is a little more complicated but not so much. In this method, we will download the binary from the Apache servers and install it normally.</p>
<p>This method ensures that you always download the latest version available at any time. So let&#8217;s go for it.</p>
<p>Navigate to the tmp folder and download alli Apache Maven.</p>
<pre>:~$ cd /tmp/
:~$ wget -c https://www-us.apache.org/dist/maven/maven-3/3.6.2/binaries/apache-maven-3.6.2-bin.tar.gz</pre>
<p><figure id="attachment_15319" aria-describedby="caption-attachment-15319" style="width: 1365px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-15319" src="https://www.osradar.com/wp-content/uploads/2019/11/3-2.png" alt="3.- Download and install Apache Maven on Debian 10" width="1365" height="269" srcset="https://www.osradar.com/wp-content/uploads/2019/11/3-2.png 1365w, https://www.osradar.com/wp-content/uploads/2019/11/3-2-300x59.png 300w, https://www.osradar.com/wp-content/uploads/2019/11/3-2-768x151.png 768w, https://www.osradar.com/wp-content/uploads/2019/11/3-2-1024x202.png 1024w, https://www.osradar.com/wp-content/uploads/2019/11/3-2-696x137.png 696w, https://www.osradar.com/wp-content/uploads/2019/11/3-2-1068x210.png 1068w" sizes="(max-width: 1365px) 100vw, 1365px" /><figcaption id="caption-attachment-15319" class="wp-caption-text">3.- Download and install Apache Maven on Debian 10</figcaption></figure></p>
<p>Then unzip the file and move it to <code>/opt/</code>.</p>
<pre>:~$ tar -zxvf apache-maven-3.6.2-bin.tar.gz
:~$ sudo mv apache-maven-3.6.2 /opt/maven</pre>
<p>Apache Maven works with Java environment paths and variables. Then you have to define them before using it. To do this, create a file called <code>maven.sh</code> in <code>/etc/profile.d/</code> and add the following:</p>
<pre>:~$ sudo nano /etc/profile.d/maven.sh</pre>
<pre>export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
export M2_HOME=/opt/maven
export PATH=${M2_HOME}/bin:${PATH}</pre>
<p><figure id="attachment_15320" aria-describedby="caption-attachment-15320" style="width: 835px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-15320" src="https://www.osradar.com/wp-content/uploads/2019/11/4-2.png" alt="4.- Configuring Apache Maven for the first use" width="835" height="128" srcset="https://www.osradar.com/wp-content/uploads/2019/11/4-2.png 835w, https://www.osradar.com/wp-content/uploads/2019/11/4-2-300x46.png 300w, https://www.osradar.com/wp-content/uploads/2019/11/4-2-768x118.png 768w, https://www.osradar.com/wp-content/uploads/2019/11/4-2-696x107.png 696w" sizes="(max-width: 835px) 100vw, 835px" /><figcaption id="caption-attachment-15320" class="wp-caption-text">4.- Configuring Apache Maven for the first use</figcaption></figure></p>
<p>To apply the changes, just use the following command:</p>
<pre>:~$ source /etc/profile.d/maven.sh</pre>
<p>Finally, you will be able to show the installed version of Maven.</p>
<pre>:~$ mvn -version</pre>
<p><figure id="attachment_15321" aria-describedby="caption-attachment-15321" style="width: 853px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-15321" src="https://www.osradar.com/wp-content/uploads/2019/11/5-1.png" alt="5.- Apache Maven on Debian 10" width="853" height="188" srcset="https://www.osradar.com/wp-content/uploads/2019/11/5-1.png 853w, https://www.osradar.com/wp-content/uploads/2019/11/5-1-300x66.png 300w, https://www.osradar.com/wp-content/uploads/2019/11/5-1-768x169.png 768w, https://www.osradar.com/wp-content/uploads/2019/11/5-1-696x153.png 696w" sizes="(max-width: 853px) 100vw, 853px" /><figcaption id="caption-attachment-15321" class="wp-caption-text">5.- Apache Maven on Debian 10</figcaption></figure></p>
<p>This indicates that Maven is ready for work.</p>
<h2>Conclusion</h2>
<p>Apache Maven is a fantastic tool for Java projects. These projects that every day continue to be references in many companies. So learning how to install Apache Maven on Debian 10 could be quite useful.</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/install-apache-maven-debian-10/">How to install Apache Maven on Debian 10?</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/install-apache-maven-debian-10/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Install Apache Maven on CentOS 7</title>
		<link>https://www.osradar.com/install-apache-maven-on-centos-7/</link>
					<comments>https://www.osradar.com/install-apache-maven-on-centos-7/#respond</comments>
		
		<dc:creator><![CDATA[angeloma]]></dc:creator>
		<pubDate>Sat, 15 Jun 2019 01:21:18 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Apache maven]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[maven]]></category>
		<category><![CDATA[Tutorial]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=12350</guid>

					<description><![CDATA[<p>The development of Java is constant today. That&#8217;s why many people are increasingly interested in learning tools that make their work easier. So, in this sense, today you will learn to install Apache Maven in CentOS 7 as a mechanism to facilitate the deployment of applications. Apache Maven Maven is an open source tool that [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/install-apache-maven-on-centos-7/">Install Apache Maven on CentOS 7</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>The development of Java is constant today. That&#8217;s why many people are increasingly interested in learning tools that make their work easier. So, in this sense, today you will learn to install <a href="https://www.osradar.com/tag/apache/">Apache</a> Maven in <a href="https://www.osradar.com/tag/centos/">CentOS</a> 7 as a mechanism to facilitate the deployment of applications.</p>
<h2>Apache Maven</h2>
<p><a href="https://maven.apache.org/">Maven</a> is an open source tool that allows you to manage projects made in Java. It belongs to the Apache Foundation, which gives us a guarantee of quality and stability. One of the main achievements of Maven is the unification of criteria at the time of verifying the .JAR files generated. Moreover, it is possible to share JARs across several projects.</p>
<p>So, some of the Maven&#8217;s goals are as follows:</p>
<ul>
<li>Making the build process easy.</li>
<li>Providing a uniform build system, quality project information, and guidelines for best practices development.</li>
<li>Allowing transparent migration to new features.</li>
</ul>
<p>So, let us start to install Apache Maven.</p>
<h2>1. Update the system</h2>
<p>The first step is to have the system updated. That is to say that all the packages of the system are to their last version.</p>
<pre>:~$ su
:~# yum update</pre>
<p><figure id="attachment_12402" aria-describedby="caption-attachment-12402" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-12402" src="https://www.osradar.com/wp-content/uploads/2019/06/1-6.png" alt="1.- Upgrade CentOS 7" width="1366" height="741" srcset="https://www.osradar.com/wp-content/uploads/2019/06/1-6.png 1366w, https://www.osradar.com/wp-content/uploads/2019/06/1-6-300x163.png 300w, https://www.osradar.com/wp-content/uploads/2019/06/1-6-768x417.png 768w, https://www.osradar.com/wp-content/uploads/2019/06/1-6-1024x555.png 1024w, https://www.osradar.com/wp-content/uploads/2019/06/1-6-696x378.png 696w, https://www.osradar.com/wp-content/uploads/2019/06/1-6-1068x579.png 1068w, https://www.osradar.com/wp-content/uploads/2019/06/1-6-774x420.png 774w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-12402" class="wp-caption-text">1.- Upgrade CentOS 7</figcaption></figure></p>
<p>This way, you will have a more stable system thanks to the security patches installed. It is also advisable to improve the robustness of some programs that could generate a security problem.</p>
<h2>2.- Install Java on CentOS 7</h2>
<p>Maven requires <a href="https://www.osradar.com/tag/java/">Java</a> to work. Although it also requires the latest version of it, so we will be able to use the OpenJDK that comes in CentOS 7 refuels.</p>
<p>For that, in a terminal, run the following:</p>
<pre>:~# yum install <code>java-1.8.0-openjdk-devel</code></pre>
<p><figure id="attachment_12403" aria-describedby="caption-attachment-12403" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-12403" src="https://www.osradar.com/wp-content/uploads/2019/06/2-5.png" alt="2.- Install Java on CentOS" width="1366" height="741" srcset="https://www.osradar.com/wp-content/uploads/2019/06/2-5.png 1366w, https://www.osradar.com/wp-content/uploads/2019/06/2-5-300x163.png 300w, https://www.osradar.com/wp-content/uploads/2019/06/2-5-768x417.png 768w, https://www.osradar.com/wp-content/uploads/2019/06/2-5-1024x555.png 1024w, https://www.osradar.com/wp-content/uploads/2019/06/2-5-696x378.png 696w, https://www.osradar.com/wp-content/uploads/2019/06/2-5-1068x579.png 1068w, https://www.osradar.com/wp-content/uploads/2019/06/2-5-774x420.png 774w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-12403" class="wp-caption-text">2.- Install Java on CentOS</figcaption></figure></p>
<p>To be sure everything went well, you can check the Java version.</p>
<pre>:~# java -version
openjdk version "1.8.0_212"
OpenJDK Runtime Environment (build 1.8.0_212-b04)
OpenJDK 64-Bit Server VM (build 25.212-b04, mixed mode)</pre>
<p>Now it is necessary to define the JAVA_HOME variable in our system.</p>
<pre>:~# echo "JAVA_HOME=$(readlink -f /usr/bin/java | sed "s:bin/java::")" | tee -a /etc/profile
JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.212.b04-0.el7_6.x86_64/jre/
:~# source /etc/profile</pre>
<p>Now we can install Apache Maven.</p>
<h3>3.- Install Apache Maven on CentOS 7</h3>
<p>To do this, let&#8217;s download it from the project repositories. At the time of writing this post, the current version is 3.6.1.</p>
<pre>:~# cd /tmp/
:~# wget http://www-us.apache.org/dist/maven/maven-3/3.6.1/binaries/apache-maven-3.6.1-bin.tar.gz</pre>
<p><figure id="attachment_12404" aria-describedby="caption-attachment-12404" style="width: 1365px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-12404" src="https://www.osradar.com/wp-content/uploads/2019/06/3-4.png" alt="3.- Download and install Apache Maven" width="1365" height="300" srcset="https://www.osradar.com/wp-content/uploads/2019/06/3-4.png 1365w, https://www.osradar.com/wp-content/uploads/2019/06/3-4-300x66.png 300w, https://www.osradar.com/wp-content/uploads/2019/06/3-4-768x169.png 768w, https://www.osradar.com/wp-content/uploads/2019/06/3-4-1024x225.png 1024w, https://www.osradar.com/wp-content/uploads/2019/06/3-4-696x153.png 696w, https://www.osradar.com/wp-content/uploads/2019/06/3-4-1068x235.png 1068w" sizes="(max-width: 1365px) 100vw, 1365px" /><figcaption id="caption-attachment-12404" class="wp-caption-text">3.- Download and install Apache Maven</figcaption></figure></p>
<p>After that, decompress it.</p>
<pre>:~# tar -zxvf apache-maven-3.6.1-bin.tar.gz</pre>
<p>Then, move it to the /opt/ directory and change the owner.</p>
<pre>:~# mv apache-maven-3.6.1 /opt/
:~# chown -R root:root /opt/apache-maven-3.6.1/</pre>
<p>After this, it is recommended to make a symbolic link to the Maven directory. This is to avoid problems with the Maven version.</p>
<pre>:~# <code>ln -s /opt/apache-maven-3.6.1 /opt/apache-maven</code></pre>
<p>And add it to the environment variable.</p>
<pre>:~# echo 'export PATH=$PATH:/opt/apache-maven/bin' | tee -a /etc/profile
export PATH=$PATH:/opt/apache-maven/bin
:~# <code>source /etc/profile</code></pre>
<p>Then, we can verify Maven&#8217;s version.</p>
<pre>:~# mvn --version
Apache Maven 3.6.1 (d66c9c0b3152b2e69ee9bac180bb8fcc8e6af555; 2019-04-04T15:00:29-04:00)
Maven home: /opt/apache-maven
Java version: 1.8.0_212, vendor: Oracle Corporation, runtime: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.212.b04-0.el7_6.x86_64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.10.0-957.12.1.el7.x86_64", arch: "amd64", family: "unix"</pre>
<p>So, Apache Maven is correctly installed.</p>
<h2>Conclusion</h2>
<p>Installing Maven on CentOS 7 is not difficult however, it is a tool widely used by Java developers. So, because of its great project management capabilities, Apache Maven has earned its place of honor in Java programming.</p>
<p>So, please share this post.</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/install-apache-maven-on-centos-7/">Install Apache Maven on CentOS 7</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/install-apache-maven-on-centos-7/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to install Apache Maven on Ubuntu 18.04 / Debian 9?</title>
		<link>https://www.osradar.com/install-apache-maven-ubuntu-18-04-debian-9/</link>
					<comments>https://www.osradar.com/install-apache-maven-ubuntu-18-04-debian-9/#respond</comments>
		
		<dc:creator><![CDATA[angeloma]]></dc:creator>
		<pubDate>Fri, 04 Jan 2019 22:42:37 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[maven]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[ubuntu]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=8924</guid>

					<description><![CDATA[<p>One of the things I like best for Java development is that there are many tools for it. Some of them become vital day by day. Others not so much, but help too much to complete the process. With this in mind, today I will teach you how to install Apache Maven on Ubuntu 18.04. [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/install-apache-maven-ubuntu-18-04-debian-9/">How to install Apache Maven on Ubuntu 18.04 / Debian 9?</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>One of the things I like best for Java development is that there are many tools for it. Some of them become vital day by day. Others not so much, but help too much to complete the process. With this in mind, today I will teach you how to install <a href="http://apache.org/" rel="noopener">Apache</a> Maven on <a href="https://www.osradar.com/tag/ubuntu/" rel="noopener">Ubuntu</a> 18.04. This tutorial is also applicable to <a href="https://www.osradar.com/tag/debian/" rel="noopener">Debian</a> 9.</p>
<p>To manage projects done in Java, there is no better tool than <a href="https://maven.apache.org/" rel="noopener">Apache Maven</a>. This fantastic tool, belonging to the Apache foundation, comes with predefined objectives to perform certain clearly defined tasks, such as code compilation and packaging.</p>
<p>There are many features that make Maven a great tool. However, the key is that Maven is ready for network use. In addition, its functions are made extensible by the ability to install plugins. Finally, Maven relies on the Project Object Model (POM) to describe the project, as well as its dependencies for later deployment.</p>
<p>So, let&#8217;s start to install Apache Maven.</p>
<h1>1. Upgrade the system</h1>
<p>First of all, I recommend you to update the system. You should always do this frequently. So open a terminal and run.</p>
<pre class="">:~$ sudo apt update &amp;&amp; sudo apt upgrade</pre>
<p><figure id="attachment_8925" aria-describedby="caption-attachment-8925" style="width: 1365px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-8925" src="https://www.osradar.com/wp-content/uploads/2019/01/1-3.png" alt="1.- Upgrade the system" width="1365" height="594" srcset="https://www.osradar.com/wp-content/uploads/2019/01/1-3.png 1365w, https://www.osradar.com/wp-content/uploads/2019/01/1-3-300x131.png 300w, https://www.osradar.com/wp-content/uploads/2019/01/1-3-768x334.png 768w, https://www.osradar.com/wp-content/uploads/2019/01/1-3-1024x446.png 1024w, https://www.osradar.com/wp-content/uploads/2019/01/1-3-1068x465.png 1068w, https://www.osradar.com/wp-content/uploads/2019/01/1-3-965x420.png 965w" sizes="(max-width: 1365px) 100vw, 1365px" /><figcaption id="caption-attachment-8925" class="wp-caption-text">1.- Upgrade the system</figcaption></figure></p>
<p><em>Note: Your user must be able to use sudo.</em></p>
<p>Now you&#8217;ll have a more stable and secure system.</p>
<h1>2. Install Oracle Java</h1>
<p>Apache Maven requires Java for its operation. It does so because it is made with this programming language, so you will have to install it. However, don&#8217;t worry because <a href="https://www.osradar.com/how-to-install-oracle-java-on-ubuntu-18-10/" rel="noopener">here</a> I show you how to do it in an easy and simple way.</p>
<p><figure id="attachment_8926" aria-describedby="caption-attachment-8926" style="width: 809px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-8926" src="https://www.osradar.com/wp-content/uploads/2019/01/2-3.png" alt="2.- Check the java version" width="809" height="164" srcset="https://www.osradar.com/wp-content/uploads/2019/01/2-3.png 809w, https://www.osradar.com/wp-content/uploads/2019/01/2-3-300x61.png 300w, https://www.osradar.com/wp-content/uploads/2019/01/2-3-768x156.png 768w" sizes="(max-width: 809px) 100vw, 809px" /><figcaption id="caption-attachment-8926" class="wp-caption-text">2.- Check the java version</figcaption></figure></p>
<p>Once you have finished installing Java, you will be able to continue.</p>
<h1>3. Install Apache Maven</h1>
<h2>First option: Installing Maven using APT</h2>
<p>There are two ways to install Apache Maven. The first and simplest is to do it through the main repositories of Ubuntu and Debian, that is, just enough:</p>
<pre class="">:~$ sudo apt install maven</pre>
<p>And that&#8217;s it.</p>
<p>This method is the simplest, but it has the main problem, the latest version of Maven is not installed. This is because repositories freeze versions of programs for stability.</p>
<h2>Second Option: From the source code</h2>
<p>In this process, we&#8217;ll do a few more steps, but we&#8217;ll always have the latest version available. If you work with Java you will know that there are always new features in each release and thus be able to take better advantage of its potential.</p>
<p>So, let&#8217;s do it. Just run:</p>
<pre class="">:~$ wget -c https://www-us.apache.org/dist/maven/maven-3/3.6.0/binaries/apache-maven-3.6.0-bin.tar.gz</pre>
<p><figure id="attachment_8927" aria-describedby="caption-attachment-8927" style="width: 1365px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-8927" src="https://www.osradar.com/wp-content/uploads/2019/01/3-3.png" alt="3.- Download and install Apache Maven" width="1365" height="290" srcset="https://www.osradar.com/wp-content/uploads/2019/01/3-3.png 1365w, https://www.osradar.com/wp-content/uploads/2019/01/3-3-300x64.png 300w, https://www.osradar.com/wp-content/uploads/2019/01/3-3-768x163.png 768w, https://www.osradar.com/wp-content/uploads/2019/01/3-3-1024x218.png 1024w, https://www.osradar.com/wp-content/uploads/2019/01/3-3-1068x227.png 1068w" sizes="(max-width: 1365px) 100vw, 1365px" /><figcaption id="caption-attachment-8927" class="wp-caption-text">3.- Download and install Apache Maven</figcaption></figure></p>
<p><em>Note: At the time of writing this post, the latest stable version is 3.6.0.</em></p>
<p>Then, decompress it.</p>
<pre class="">:~$ tar -zxvf apache-maven-3.6.0-bin.tar.gz</pre>
<p><figure id="attachment_8928" aria-describedby="caption-attachment-8928" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-8928" src="https://www.osradar.com/wp-content/uploads/2019/01/4-3.png" alt="4.- Decompressing the file" width="1366" height="768" srcset="https://www.osradar.com/wp-content/uploads/2019/01/4-3.png 1366w, https://www.osradar.com/wp-content/uploads/2019/01/4-3-300x169.png 300w, https://www.osradar.com/wp-content/uploads/2019/01/4-3-768x432.png 768w, https://www.osradar.com/wp-content/uploads/2019/01/4-3-1024x576.png 1024w, https://www.osradar.com/wp-content/uploads/2019/01/4-3-1068x600.png 1068w, https://www.osradar.com/wp-content/uploads/2019/01/4-3-747x420.png 747w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-8928" class="wp-caption-text">4.- Decompressing the file</figcaption></figure></p>
<p>Now, move the folder to /opt.</p>
<pre class="">:~$ sudo mv apache-maven-3.6.0 /opt/maven</pre>
<p><figure id="attachment_8929" aria-describedby="caption-attachment-8929" style="width: 817px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-8929" src="https://www.osradar.com/wp-content/uploads/2019/01/5-3.png" alt="5.- Installing apache maven" width="817" height="135" srcset="https://www.osradar.com/wp-content/uploads/2019/01/5-3.png 817w, https://www.osradar.com/wp-content/uploads/2019/01/5-3-300x50.png 300w, https://www.osradar.com/wp-content/uploads/2019/01/5-3-768x127.png 768w" sizes="(max-width: 817px) 100vw, 817px" /><figcaption id="caption-attachment-8929" class="wp-caption-text">5.- Installing Apache Maven</figcaption></figure></p>
<p>It is now necessary to set the environment variables. Create a file called <code>maven.sh</code> in <code>/etc/profile</code>.</p>
<pre class="">:~$ sudo nano /etc/profile.d/maven.sh</pre>
<p>And add the following lines.</p>
<pre class="">export JAVA_HOME=/usr/lib/jvm/java-11-oracle
export M2_HOME=/opt/maven
export PATH=${M2_HOME}/bin:${PATH}</pre>
<p><em>Note: The JAVA_HOME variable can be obtained with the command update-java-alternatives -l.</em></p>
<p><figure id="attachment_8930" aria-describedby="caption-attachment-8930" style="width: 813px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-8930" src="https://www.osradar.com/wp-content/uploads/2019/01/6-2.png" alt="6.- Finding the Java path" width="813" height="158" srcset="https://www.osradar.com/wp-content/uploads/2019/01/6-2.png 813w, https://www.osradar.com/wp-content/uploads/2019/01/6-2-300x58.png 300w, https://www.osradar.com/wp-content/uploads/2019/01/6-2-768x149.png 768w" sizes="(max-width: 813px) 100vw, 813px" /><figcaption id="caption-attachment-8930" class="wp-caption-text">6.- Finding the Java path</figcaption></figure></p>
<p>Finally, run:</p>
<pre class="">:~$ source /etc/profile.d/maven.sh</pre>
<p>Finally, check the Maven version.</p>
<pre class="">:~$ mvn -version</pre>
<p><figure id="attachment_8934" aria-describedby="caption-attachment-8934" style="width: 794px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-8934" src="https://www.osradar.com/wp-content/uploads/2019/01/7-2.png" alt="7.- Check the Maven version" width="794" height="229" srcset="https://www.osradar.com/wp-content/uploads/2019/01/7-2.png 794w, https://www.osradar.com/wp-content/uploads/2019/01/7-2-300x87.png 300w, https://www.osradar.com/wp-content/uploads/2019/01/7-2-768x222.png 768w" sizes="(max-width: 794px) 100vw, 794px" /><figcaption id="caption-attachment-8934" class="wp-caption-text">7.- Check the Maven version</figcaption></figure></p>
<p>And that&#8217;s it.</p>
<h1>Conclusion</h1>
<p>Apache Maven is a very important tool in the development of projects, especially if they are Java. Its installation is not difficult but its benefits are many.</p>
<p>Please share this post with your friends.</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/install-apache-maven-ubuntu-18-04-debian-9/">How to install Apache Maven on Ubuntu 18.04 / Debian 9?</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/install-apache-maven-ubuntu-18-04-debian-9/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
