<?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>Apache maven Archives - Linux Windows and android Tutorials</title>
	<atom:link href="https://www.osradar.com/tag/apache-maven/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.osradar.com</link>
	<description>tutorials and news and Seurity</description>
	<lastBuildDate>Tue, 12 Nov 2019 21:28:55 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.8.12</generator>
	<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>
	</channel>
</rss>
