<?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 ant Archives - Linux Windows and android Tutorials</title>
	<atom:link href="https://www.osradar.com/tag/apache-ant/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.osradar.com</link>
	<description>tutorials and news and Seurity</description>
	<lastBuildDate>Thu, 03 Sep 2020 15:35:40 +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 Ant on OpenSUSE 15.1 / 15.2?</title>
		<link>https://www.osradar.com/install-apache-ant-opensuse-15-2-15-1/</link>
					<comments>https://www.osradar.com/install-apache-ant-opensuse-15-2-15-1/#respond</comments>
		
		<dc:creator><![CDATA[angeloma]]></dc:creator>
		<pubDate>Sat, 29 Aug 2020 03:11:00 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[ant]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[apache ant]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[opensuse]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=19217</guid>

					<description><![CDATA[<p>Hi, folks. This time I will tell you how to install Apache Ant on OpenSUSE 15.2 / 15.1 Recently I have taught you how to do it on Debian, however, OpenSUSE is a very popular distribution that is also used by many Java developers around the world. Apache Ant Apache Ant is an application created [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/install-apache-ant-opensuse-15-2-15-1/">How to install Apache Ant on OpenSUSE 15.1 / 15.2?</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Hi, folks. This time I will tell you <strong>how to install Apache Ant on OpenSUSE 15.2 / 15.1</strong> Recently I have taught you <a href="https://www.osradar.com/how-to-install-apache-ant-debian-10/" target="_blank" rel="noopener noreferrer">how to do it on Debian</a>, however, OpenSUSE is a very popular distribution that is also used by many Java developers around the world.</p>
<h2>Apache Ant</h2>
<p><a href="https://ant.apache.org/" target="_blank" rel="noopener noreferrer">Apache Ant</a> is an application created in <a href="https://www.osradar.com/tag/java" target="_blank" rel="noopener noreferrer">Java</a> sponsored by the Apache foundation that allows automating tasks of compilation and construction of projects. As it is made in Java it is common to use it for Java projects.</p>
<p>Thanks to Apache Ant it is possible to save a lot of time in medium size projects. It is similar to the make tool, the difference is that it uses a file called build.xml where you specify the rules that the application will use.</p>
<p>With this in mind, it is very likely that if you develop applications with Java, you will use Ant.</p>
<h2 class="td-g-rec td-g-rec-id-content_inline td_uid_2_5e7e50ce4e128_rand td_block_template_1 ">Install Apache Ant on OpenSUSE 15.2 / 15.1</h2>
<p>OpenSUSE is becoming more and more popular thanks to the stability it provides. And that pleases many Java developers. For this, we need Java and some other configurations.</p>
<h3>Install Java on OpenSUSE 15.2 / 15.1</h3>
<p>As Apache Ant is built in Java and its potential is better exploited in Java projects.</p>
<p>So you have to install Java on OpenSUSE 15.2 /15.1 but first, it is recommended to update the system.</p>
<p>So, open a terminal and run it:</p>
<pre>:~$ sudo zypper up</pre>
<p>This way the system will be updated and with the security patches correctly installed.</p>
<p>Java 11 is available in the official OpenSUSE 15.2 / 15.1 repositories through the OpenJDK project. To check it out, you can run the following command:</p>
<pre>:~$ sudo zypper search openjdk<br />S | Name                             | Summary                            | Type      <br />--+----------------------------------+------------------------------------+-----------<br />  | java-10-openjdk                  | OpenJDK 10 Runtime Environment     | package   <br />  | java-10-openjdk                  | OpenJDK 10 Runtime Environment     | srcpackage<br />  | java-10-openjdk-accessibility    | OpenJDK 10 accessibility connector | package   <br />  | java-10-openjdk-demo             | OpenJDK 10 Demos                   | package   <br />  | java-10-openjdk-devel            | OpenJDK 10 Development Environment | package   <br />  | java-10-openjdk-headless         | OpenJDK 10 Runtime Environment     | package   <br />  | java-10-openjdk-javadoc          | OpenJDK 10 API Documentation       | package   <br />  | java-10-openjdk-jmods            | JMods for OpenJDK 10               | package   <br />  | java-10-openjdk-src              | OpenJDK 10 Source Bundle           | package   <br />  | java-11-openjdk                  | OpenJDK 11 Runtime Environment     | package   <br />  | java-11-openjdk                  | OpenJDK 11 Runtime Environment     | srcpackage<br />  | java-11-openjdk-accessibility    | OpenJDK 11 accessibility connector | package   <br />  | java-11-openjdk-demo             | OpenJDK 11 Demos                   | package   <br />  | java-11-openjdk-devel            | OpenJDK 11 Development Environment | package   <br />  | java-11-openjdk-headless         | OpenJDK 11 Runtime Environment     | package   <br />  | java-11-openjdk-javadoc          | OpenJDK 11 API Documentation       | package   <br />  | java-11-openjdk-jmods            | JMods for OpenJDK 11               | package   <br />  | java-11-openjdk-src              | OpenJDK 11 Source Bundle           | package   <br />  | java-1_8_0-openjdk               | OpenJDK 8 Runtime Environment      | package   <br />  | java-1_8_0-openjdk               | OpenJDK 8 Runtime Environment      | srcpackage<br />  | java-1_8_0-openjdk-accessibility | OpenJDK 8 accessibility connector  | package   <br />  | java-1_8_0-openjdk-demo          | OpenJDK 8 Demos                    | package   <br />  | java-1_8_0-openjdk-devel         | OpenJDK 8 Development Environment  | package   <br />  | java-1_8_0-openjdk-headless      | OpenJDK 8 Runtime Environment      | package   <br />  | java-1_8_0-openjdk-javadoc       | OpenJDK 8 API Documentation        | package   <br />  | java-1_8_0-openjdk-src           | OpenJDK 8 Source Bundle            | package</pre>
<figure id="attachment_19281" aria-describedby="caption-attachment-19281" style="width: 984px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-19281" src="https://www.osradar.com/wp-content/uploads/2020/03/1-23.png" alt="1.- Search for Java on the OpenSUSE repositories" width="984" height="484" srcset="https://www.osradar.com/wp-content/uploads/2020/03/1-23.png 984w, https://www.osradar.com/wp-content/uploads/2020/03/1-23-300x148.png 300w, https://www.osradar.com/wp-content/uploads/2020/03/1-23-768x378.png 768w, https://www.osradar.com/wp-content/uploads/2020/03/1-23-324x160.png 324w, https://www.osradar.com/wp-content/uploads/2020/03/1-23-533x261.png 533w, https://www.osradar.com/wp-content/uploads/2020/03/1-23-696x342.png 696w, https://www.osradar.com/wp-content/uploads/2020/03/1-23-854x420.png 854w" sizes="(max-width: 984px) 100vw, 984px" /><figcaption id="caption-attachment-19281" class="wp-caption-text">1.- Search for Java on the OpenSUSE repositories</figcaption></figure>
<p>So to install it, just run the following command:</p>
<pre>:~$ sudo zypper in java-11-openjdk<br />Loading repository data...<br />Reading installed packages...<br />Resolving package dependencies...<br />The following 11 NEW packages are going to be installed:<br />  java-11-openjdk java-11-openjdk-headless javapackages-tools libFLAC8 libgif7 libpcsclite1 libpulse0 libsndfile1 libspeex1 pcsc-lite timezone-java<br />The following 2 recommended packages were automatically selected:<br />  pcsc-lite timezone-java<br />11 new packages to install.<br />Overall download size: 35,7 MiB. Already cached: 0 B. After the operation, additional 167,4 MiB will be used.<br />Continue? [y/n/v/...? shows all options] (y):</pre>
<figure id="attachment_19283" aria-describedby="caption-attachment-19283" style="width: 1079px" class="wp-caption alignnone"><img loading="lazy" class="wp-image-19283 size-full" src="https://www.osradar.com/wp-content/uploads/2020/03/2-26.png" alt="2.- Install Java on OpenSUSE 15.2 / 15.1" width="1079" height="251" srcset="https://www.osradar.com/wp-content/uploads/2020/03/2-26.png 1079w, https://www.osradar.com/wp-content/uploads/2020/03/2-26-300x70.png 300w, https://www.osradar.com/wp-content/uploads/2020/03/2-26-1024x238.png 1024w, https://www.osradar.com/wp-content/uploads/2020/03/2-26-768x179.png 768w, https://www.osradar.com/wp-content/uploads/2020/03/2-26-696x162.png 696w, https://www.osradar.com/wp-content/uploads/2020/03/2-26-1068x248.png 1068w" sizes="(max-width: 1079px) 100vw, 1079px" /><figcaption id="caption-attachment-19283" class="wp-caption-text">2.- Install Java on OpenSUSE 15.2 / 15.1</figcaption></figure>
<p>Finally, check the version of Java installed.</p>
<pre>:~$ java --version<br />openjdk 11.0.6 2020-01-14<br />OpenJDK Runtime Environment (build 11.0.6+10-suse-lp151.3.12.1-x8664)<br />OpenJDK 64-Bit Server VM (build 11.0.6+10-suse-lp151.3.12.1-x8664, mixed mode)</pre>
<h3>Install Apache Ant on OpenSUSE 15.2 / 15.1</h3>
<p>Now we can download and install Apache Ant on OpenSUSE 15.2 / 15.1</p>
<p>First locate the temporary folder and from there download with wget.</p>
<pre>:~$ cd /tmp/<br />:~$ wget -c http://mirrors.advancedhosters.com/apache/ant/binaries/apache-ant-1.10.7-bin.tar.gz<br />--2020-03-26 18:33:15--  http://mirrors.advancedhosters.com/apache/ant/binaries/apache-ant-1.10.7-bin.tar.gz<br />Resolving mirrors.advancedhosters.com (mirrors.advancedhosters.com)... 213.174.147.249, 2a02:b48:6:1::2<br />Connecting to mirrors.advancedhosters.com (mirrors.advancedhosters.com)|213.174.147.249|:80... connected.<br />HTTP request sent, awaiting response... 200 OK<br />Length: 6874544 (6,6M) [application/octet-stream]<br />Saving to: ‘apache-ant-1.10.7-bin.tar.gz’<br />apache-ant-1.10.7-bin.tar.gz 100%[=====================================================================================&gt;] 6,56M 347KB/s in 22s<br />2020-03-26 18:33:37 (311 KB/s) - ‘apache-ant-1.10.7-bin.tar.gz’ saved [6874544/6874544]</pre>
<figure id="attachment_19286" aria-describedby="caption-attachment-19286" style="width: 1079px" class="wp-caption alignnone"><img loading="lazy" class="wp-image-19286 size-full" src="https://www.osradar.com/wp-content/uploads/2020/03/3-25.png" alt="3.- Download Apache Ant on OpenSUSE 15.2 / 15.1" width="1079" height="222" srcset="https://www.osradar.com/wp-content/uploads/2020/03/3-25.png 1079w, https://www.osradar.com/wp-content/uploads/2020/03/3-25-300x62.png 300w, https://www.osradar.com/wp-content/uploads/2020/03/3-25-1024x211.png 1024w, https://www.osradar.com/wp-content/uploads/2020/03/3-25-768x158.png 768w, https://www.osradar.com/wp-content/uploads/2020/03/3-25-696x143.png 696w, https://www.osradar.com/wp-content/uploads/2020/03/3-25-1068x220.png 1068w" sizes="(max-width: 1079px) 100vw, 1079px" /><figcaption id="caption-attachment-19286" class="wp-caption-text">3.- Download Apache Ant on OpenSUSE 15.2 / 15.1</figcaption></figure>
<p>Once the download is complete, unzip it and move it to /usr/local/</p>
<pre>:~$ tar -xvf apache-ant-1.10.7-bin.tar.gz<br />:~$ sudo mv apache-ant-1.10.7/ /usr/local/ant</pre>
<p>That&#8217;s enough to use it. However, it is a good idea to modify the bash profile so that Apache Ant is available from any directory and not from where it is copied.</p>
<p>So modify the profile configuration file:</p>
<pre>:~$ sudo nano /etc/profile</pre>
<p>And add the following to the end of the file:</p>
<pre>ANT_HOME="/usr/local/ant"<br />PATH="$PATH:/usr/local/ant/bin"<br />export ANT_HOME<br />export PATH</pre>
<figure id="attachment_19287" aria-describedby="caption-attachment-19287" style="width: 508px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-19287" src="https://www.osradar.com/wp-content/uploads/2020/03/4-17.png" alt="4.- Editing the profile file" width="508" height="198" srcset="https://www.osradar.com/wp-content/uploads/2020/03/4-17.png 508w, https://www.osradar.com/wp-content/uploads/2020/03/4-17-300x117.png 300w" sizes="(max-width: 508px) 100vw, 508px" /><figcaption id="caption-attachment-19287" class="wp-caption-text">4.- Editing the profile file</figcaption></figure>
<p>Apply the changes with the following command:</p>
<pre>:~$ source /etc/profile</pre>
<h3>Testing the installation</h3>
<p>Now that Apache ant is installed we will do two tests to check that it works.</p>
<p>The first one will be to choose any directory and execute the command ant</p>
<pre>:~$ ant</pre>
<p>And you will have a screen output like this:</p>
<pre>Buildfile: build.xml does not exist!<br />Build failed</pre>
<figure id="attachment_19288" aria-describedby="caption-attachment-19288" style="width: 644px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-19288" src="https://www.osradar.com/wp-content/uploads/2020/03/5-19.png" alt="5.- Ant working" width="644" height="128" srcset="https://www.osradar.com/wp-content/uploads/2020/03/5-19.png 644w, https://www.osradar.com/wp-content/uploads/2020/03/5-19-300x60.png 300w" sizes="(max-width: 644px) 100vw, 644px" /><figcaption id="caption-attachment-19288" class="wp-caption-text">5.- Ant working</figcaption></figure>
<p>If this is so, Ant is working well. Remember that apache Ant requires a build.xml file to perform the processes. This error indicates that ant is working, it just can&#8217;t find the file.</p>
<p>Finally, you can check the installed version:</p>
<pre>:~$ ant -version<br />Apache Ant(TM) version 1.10.7 compiled on September 1 2019</pre>
<p>So, Ant is ready to be used.</p>
<h2>Conclusion</h2>
<p>In this post you have learned how to install Apache Ant on OpenSUSE quickly and easily. Also with this method you will always have the latest stable version.</p>
<p>Please share this post with your friends and join <a href="https://t.me/osradar" target="_blank" rel="noopener noreferrer">our Telegram channel</a>.</p>


<p></p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/install-apache-ant-opensuse-15-2-15-1/">How to install Apache Ant on OpenSUSE 15.1 / 15.2?</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-ant-opensuse-15-2-15-1/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to install Apache Ant on CentOS 8?</title>
		<link>https://www.osradar.com/how-to-install-apache-ant-centos-8/</link>
					<comments>https://www.osradar.com/how-to-install-apache-ant-centos-8/#respond</comments>
		
		<dc:creator><![CDATA[angeloma]]></dc:creator>
		<pubDate>Tue, 14 Apr 2020 23:12:00 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[apache ant]]></category>
		<category><![CDATA[Centos 8]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[java]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=19216</guid>

					<description><![CDATA[<p>Apache Ant functions as an important tool in the development of Java applications. With this tool, you will not have to worry about repetitive tasks in the process of compiling, and generating packages from source code in Java projects. So, this post is about installing Apaache Ant on CentOS 8. Apache Ant Apache Ant is [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-install-apache-ant-centos-8/">How to install Apache Ant 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>Apache Ant functions as an important tool in the development of Java applications. With this tool, you will not have to worry about repetitive tasks in the process of compiling, and generating packages from source code in Java projects. So, this post is about installing Apaache Ant on CentOS 8.</p>
<h2>Apache Ant</h2>
<p><a href="https://ant.apache.org/" target="_blank" rel="noopener noreferrer">Apache Ant</a> is an application created in <a href="https://www.osradar.com/tag/java" target="_blank" rel="noopener noreferrer">Java</a> sponsored by the Apache foundation that allows automating tasks of compilation and construction of projects. As it is made in Java it is common to use it for Java projects.</p>
<p>Thanks to Apache Ant it is possible to save a lot of time in medium size projects. It is similar to the make tool, the difference is that it uses a file called build.xml where you specify the rules that the application will use.</p>
<p>With this in mind, it is very likely that if you develop applications with Java, you will use Ant.</p>
<h2>Let us work</h2>
<h3>Install Java on CentOS 8</h3>
<p>The first step is to install Java. Java is a very popular development platform and is the basis for many projects worldwide.</p>
<p>Apache Ant is built with Java technology. This makes it necessary to install it for it to run.</p>
<p>OpenJDK 11 is available from the CentOS 8 repositories. To find it, run the following command:</p>
<pre>:~$ sudo dnf search openjdk<br>Failed to set locale, defaulting to C.UTF-8<br>Last metadata expiration check: 0:41:14 ago on Mon Apr  6 10:34:18 2020.<br>==================================================================== Name &amp; Summary Matched: openjdk ====================================================================<br>java-11-openjdk-demo.x86_64 : OpenJDK Demos 11<br>java-1.8.0-openjdk-demo.x86_64 : OpenJDK Demos 8<br>java-11-openjdk-jmods.x86_64 : JMods for OpenJDK 11<br>java-11-openjdk-src.x86_64 : OpenJDK Source Bundle 11<br>java-11-openjdk.x86_64 : OpenJDK Runtime Environment 11<br>java-1.8.0-openjdk-src.x86_64 : OpenJDK Source Bundle 8<br>java-11-openjdk.x86_64 : OpenJDK Runtime Environment 11<br>java-1.8.0-openjdk.x86_64 : OpenJDK Runtime Environment 8<br>java-11-openjdk-javadoc.x86_64 : OpenJDK 11 API documentation<br>java-1.8.0-openjdk-javadoc.noarch : OpenJDK 8 API documentation<br>java-11-openjdk-devel.x86_64 : OpenJDK Development Environment 11<br>java-1.8.0-openjdk-devel.x86_64 : OpenJDK Development Environment 8<br>java-11-openjdk-headless.x86_64 : OpenJDK Headless Runtime Environment 11<br>java-11-openjdk-headless.x86_64 : OpenJDK Headless Runtime Environment 11<br>java-1.8.0-openjdk-accessibility.x86_64 : OpenJDK 8 accessibility connector<br>java-1.8.0-openjdk-headless.x86_64 : OpenJDK Headless Runtime Environment 8<br>java-11-openjdk-javadoc-zip.x86_64 : OpenJDK 11 API documentation compressed in single archive<br>java-1.8.0-openjdk-javadoc-zip.noarch : OpenJDK 8 API documentation compressed in single archive<br>======================================================================= Summary Matched: openjdk ========================================================================<br>icedtea-web.noarch : Additional Java components for OpenJDK - Java browser plug-in and Web Start implementation<br><br></pre>
<p>As you can see in the image above, Java 11 is available for installation from the official repositories through the OpenJDK project.</p>
<p>So to install it, run the following command:</p>
<pre>:~$ sudo dnf install java-11-openjdk</pre>
<figure id="attachment_19660" aria-describedby="caption-attachment-19660" style="width: 1365px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-19660" src="https://www.osradar.com/wp-content/uploads/2020/04/1-4.png" alt="1.- Install Java on CentOS 8" width="1365" height="718" srcset="https://www.osradar.com/wp-content/uploads/2020/04/1-4.png 1365w, https://www.osradar.com/wp-content/uploads/2020/04/1-4-300x158.png 300w, https://www.osradar.com/wp-content/uploads/2020/04/1-4-1024x539.png 1024w, https://www.osradar.com/wp-content/uploads/2020/04/1-4-768x404.png 768w, https://www.osradar.com/wp-content/uploads/2020/04/1-4-696x366.png 696w, https://www.osradar.com/wp-content/uploads/2020/04/1-4-1068x562.png 1068w" sizes="(max-width: 1365px) 100vw, 1365px" /><figcaption id="caption-attachment-19660" class="wp-caption-text">1.- Install Java on CentOS 8</figcaption></figure>
<p>Confirm the installation and it will start.</p>
<p>When it is finished, you can check the operation of Java with the following command:</p>
<pre>~$ java --version<br>openjdk 11.0.6 2020-01-14 LTS<br>OpenJDK Runtime Environment 18.9 (build 11.0.6+10-LTS)<br>OpenJDK 64-Bit Server VM 18.9 (build 11.0.6+10-LTS, mixed mode, sharing)</pre>
<p>So, Java is correctly installed.</p>
<h3>Download and Install Apache Ant on CentOS 8</h3>
<p>Apache Ant is a project sponsored by the Apache Foundation. This makes the download safe and free to use.</p>
<p>In this case, I will use an Apache mirror to download it.</p>
<pre>:~$ cd /tmp/<br>:~$ wget -c http://mirrors.advancedhosters.com/apache/ant/binaries/apache-ant-1.10.7-bin.zip<br>--2020-04-06 11:18:58--  http://mirrors.advancedhosters.com/apache/ant/binaries/apache-ant-1.10.7-bin.zip<br>Resolving mirrors.advancedhosters.com (mirrors.advancedhosters.com)... 213.174.147.249, 2a02:b48:6:1::2<br>Connecting to mirrors.advancedhosters.com (mirrors.advancedhosters.com)|213.174.147.249|:80... connected.<br>HTTP request sent, awaiting response... 200 OK<br>Length: 10186279 (9.7M) [application/zip]<br>Saving to: 'apache-ant-1.10.7-bin.zip'<br><br>apache-ant-1.10.7-bin.zip                  100%[=====================================================================================&gt;]   9.71M   496KB/s    in 25s     <br><br>2020-04-06 11:19:25 (396 KB/s) - 'apache-ant-1.10.7-bin.zip' saved [10186279/10186279]</pre>
<p>At the time of this tutorial, the latest stable version of Apache Ant is 1.10.7 When a new version is released all you have to do is update the command.</p>
<p>The downloaded version is in ZIP format. To unzip it, use the unzip command. If you don&#8217;t have it downloaded, just install it like this:</p>
<pre>:~$ sudo dnf install unzip</pre>
<p>Now, proceed to decompress it.</p>
<pre>:~$ unzip apache-ant-1.10.7-bin.zip</pre>
<p>And move the folder that is created to another location such as</p>
<pre>:~$ sudo mv apache-ant-1.10.7/ /usr/local/ant</pre>
<p>Now we have to make Ant available as a command to all users of the system. This will make it easy to use and run from any folder.</p>
<pre>:~$ sudo nano /etc/profile</pre>
<p>And add the following lines:</p>
<pre>ANT_HOME="/usr/local/ant"<br>PATH="$PATH:/usr/local/ant/bin"<br>export ANT_HOME<br>export PATH</pre>
<figure id="attachment_19661" aria-describedby="caption-attachment-19661" style="width: 858px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-19661" src="https://www.osradar.com/wp-content/uploads/2020/04/2-3.png" alt="2.- Edit the profile file" width="858" height="149" srcset="https://www.osradar.com/wp-content/uploads/2020/04/2-3.png 858w, https://www.osradar.com/wp-content/uploads/2020/04/2-3-300x52.png 300w, https://www.osradar.com/wp-content/uploads/2020/04/2-3-768x133.png 768w, https://www.osradar.com/wp-content/uploads/2020/04/2-3-696x121.png 696w" sizes="(max-width: 858px) 100vw, 858px" /><figcaption id="caption-attachment-19661" class="wp-caption-text">2.- Edit the profile file</figcaption></figure>
<p>Then save the changes and close the editor.</p>
<p>Apply the changes made with the command:</p>
<pre>:~$ source /etc/profile</pre>
<p>Now, test it!</p>
<h3>Test the Apache Ant installation</h3>
<p>Once we have configured Ant, we must test if it works. The first test is to show the version of Ant using the command ant.</p>
<pre>:~$ ant -version<br>Apache Ant(TM) version 1.10.7 compiled on September 1 2019</pre>
<p>As you can see, the command works. Now place yourself in any folder and run ant.</p>
<pre>:~$ ant</pre>
<p>You&#8217;ll get the next output on the screen:</p>
<pre>Buildfile: build.xml does not exist!<br>Build failed</pre>
<figure id="attachment_19662" aria-describedby="caption-attachment-19662" style="width: 821px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-19662" src="https://www.osradar.com/wp-content/uploads/2020/04/3-3.png" alt="3.- Testing Ant on CentOS 8" width="821" height="122" srcset="https://www.osradar.com/wp-content/uploads/2020/04/3-3.png 821w, https://www.osradar.com/wp-content/uploads/2020/04/3-3-300x45.png 300w, https://www.osradar.com/wp-content/uploads/2020/04/3-3-768x114.png 768w, https://www.osradar.com/wp-content/uploads/2020/04/3-3-696x103.png 696w" sizes="(max-width: 821px) 100vw, 821px" /><figcaption id="caption-attachment-19662" class="wp-caption-text">3.- Testing Ant on CentOS 8</figcaption></figure>
<p>This indicates that the command is working. All that remains is to create a build.xml file with the compilation instructions.</p>
<p>You can also check the command&#8217;s help:</p>
<pre>:~$ ant --help</pre>
<figure id="attachment_19663" aria-describedby="caption-attachment-19663" style="width: 943px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-19663" src="https://www.osradar.com/wp-content/uploads/2020/04/4-2.png" alt="4.- Ant help" width="943" height="652" srcset="https://www.osradar.com/wp-content/uploads/2020/04/4-2.png 943w, https://www.osradar.com/wp-content/uploads/2020/04/4-2-300x207.png 300w, https://www.osradar.com/wp-content/uploads/2020/04/4-2-768x531.png 768w, https://www.osradar.com/wp-content/uploads/2020/04/4-2-218x150.png 218w, https://www.osradar.com/wp-content/uploads/2020/04/4-2-696x481.png 696w" sizes="(max-width: 943px) 100vw, 943px" /><figcaption id="caption-attachment-19663" class="wp-caption-text">4.- Ant help</figcaption></figure>
<p>So, enjoy it.</p>
<h2>Conclusion</h2>
<p>Apache Ant is a very important application for many Java developers. So it might be a good idea to have it if you want to start with Java.</p>
<p>Please share this post and join <a href="https://t.me/osradar" target="_blank" rel="noopener noreferrer">our Telegram channel</a>.</p>


<p></p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-install-apache-ant-centos-8/">How to install Apache Ant 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-ant-centos-8/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
