<?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>How To Install Apache Maven on CentOS 8 Archives - Linux Windows and android Tutorials</title>
	<atom:link href="https://www.osradar.com/tag/how-to-install-apache-maven-on-centos-8/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.osradar.com</link>
	<description>tutorials and news and Seurity</description>
	<lastBuildDate>Wed, 01 Apr 2020 07:18:17 +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 Apache Maven on CentOS 8</title>
		<link>https://www.osradar.com/how-to-install-apache-maven-on-centos-8/</link>
					<comments>https://www.osradar.com/how-to-install-apache-maven-on-centos-8/#respond</comments>
		
		<dc:creator><![CDATA[sabi]]></dc:creator>
		<pubDate>Wed, 01 Apr 2020 07:18:15 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Apache Maven installation guide]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[How To Install Apache Maven on CentOS 8]]></category>
		<category><![CDATA[install Apache Maven on Centos]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=18982</guid>

					<description><![CDATA[<p>Today, we are going to learn that how to Install Apache Maven on CentOS 8. Apache Maven is a build automation tool used frequently for java tasks. Maven also can be used to develop and manipulate projects written in c#, ruby, scala, and other languages. Maven addresses two aspects of developing software: how software is [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-install-apache-maven-on-centos-8/">How To Install Apache Maven on CentOS 8</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Today, we are going to learn that how to <a href="https://www.osradar.com/?p=18982">Install Apache Maven on CentOS 8</a>.  Apache Maven is a build automation tool used frequently for java tasks. Maven also can be used to develop and manipulate projects written in c#, ruby, scala, and other languages.</p>



<p>Maven addresses two aspects of developing software: how software is developed, and its dependencies. Not like in advance equipment like Apache ant, it makes use of conventions for the build technique, and most effective exceptions need to be written down. </p>



<p>An xml document describes the software assignment being developed, its dependencies on other outside modules and additives, the build order, directories, and required plugins. It comes with pre-defined targets for performing certain nicely-defined tasks together with compilation of code and its packaging. </p>



<p>So, let&#8217;s move towards the installation of Apache Maven on CentOS 8.</p>



<h2><strong>Step 1: Install OpenJDK 8</strong></h2>



<p>First of all install the main requirements for the installation of Apache Maven. You can install Oracle Java on CentOS 8 or proceed with the OpenJDK. I&#8217;m starting my installation with the OpenJDK. So, install the java by running the following command.</p>



<pre class="wp-block-verse">sudo dnf -y install java-1.8.0-openjdk-devel</pre>



<p>Make sure that the installation was successful. For this run the given command</p>



<pre class="wp-block-verse">java -version</pre>



<p>Output:</p>



<p>You&#8217;ll see the output like below</p>



<pre class="wp-block-verse">[sabi@localhost ~]$ java -version<br> openjdk version "1.8.0_242"<br> OpenJDK Runtime Environment (build 1.8.0_242-b08)<br> OpenJDK 64-Bit Server VM (build 25.242-b08, mixed mode)</pre>



<h3><strong>Step 2: Install Apache Maven</strong></h3>



<p>If you don&#8217;t have installed wget, install it by typing</p>



<pre class="wp-block-verse">sudo dnf -y install wget</pre>



<p>Output:</p>



<pre class="wp-block-verse">[sabi@localhost ~]$ sudo dnf -y install wget<br> Last metadata expiration check: 6:36:15 ago on Sun 29 Mar 2020 10:50:06 PM EDT.<br> Package wget-1.19.5-7.el8_0.1.x86_64 is already installed.<br> Dependencies resolved.<br>  Package      Architecture   Version                    Repository         Size<br> Upgrading:<br>  wget         x86_64         1.19.5-8.el8_1.1           AppStream         735 k<br> Transaction Summary<br> Upgrade  1 Package<br> Total download size: 735 k<br> Downloading Packages:<br> wget-1.19.5-8.el8_1.1.x86_64.rpm                 13 kB/s | 735 kB     00:54    <br> Total                                            13 kB/s | 735 kB     00:55     </pre>



<p>Then go to the Apache Maven <a href="https://maven.apache.org/download.cgi">official release page</a> to download the latest version of it. You can also donwload it by the following command</p>



<pre class="wp-block-verse">wget https://www-eu.apache.org/dist/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz</pre>



<p>Once, the package is downloaded, extract the archive by typing the given command.</p>



<pre class="wp-block-verse">tar -zxvf apache-maven-3.6.3-bin.tar.gz</pre>



<p>And then move the resultant to the <strong>/opt/maven </strong>directory </p>



<pre class="wp-block-verse">mv apache-maven-3.6.3 /opt/maven</pre>



<h3><strong>Step 3: Setting Up Environment Variables</strong></h3>



<p>After installing the Apache Maven, create a new file as maven.sh under the /etc/profile.d/ directory. You can use your favorite editor.</p>



<pre class="wp-block-verse">sudo nano /etc/profile.d/maven.sh</pre>



<p>And then paste the below data into the above file.</p>



<pre class="wp-block-verse">export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.232.b09-2.el8_1.x86_64/<br> export M2_HOME=/opt/maven<br> export PATH=${M2_HOME}/bin:${PATH}</pre>



<p><strong>Note: </strong>JAVA_HOME &amp; M2_HOME depends on JDK &amp; Maven installation.</p>



<p>After it load the environment variables with the help of the given command</p>



<pre class="wp-block-verse">source /etc/profile.d/maven.sh</pre>



<h3><strong>Step 4: Verification of Apache Maven</strong></h3>



<p>Verify the successful configuration of Apache Maven on CentOS 8 by checking the version of Maven using below command</p>



<pre class="wp-block-verse">mvn -version</pre>



<p>Output:</p>



<p>You will see the similar output</p>



<pre class="wp-block-verse">Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)<br> Maven home: /opt/maven<br> Java version: 1.8.0_232, vendor: Oracle Corporation, runtime: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.232.b09-2.el8_1.x86_64/jre<br> Default locale: en_US, platform encoding: UTF-8<br> OS name: "linux", version: "4.18.0-80.11.2.el8_0.x86_64", arch: "amd64", family: "unix"</pre>



<p>So, this is how you can install Apache Maven on CentOS 8.</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-install-apache-maven-on-centos-8/">How To Install Apache Maven on CentOS 8</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-apache-maven-on-centos-8/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
