Ant 1.8 1 Download
I recently had to reinstall the OS on the laptop I use primarily for work. I thought I had installed everything I needed, but realized that I couldn't run the FTP task in Ant because of missing libraries. The message I received was:
- Apache Ant 1.8.1 Download
- Apache Ant 1.8.1 Download
- Apache Ant 1.8 1 Bin Zip Download
- Ant 1.8 Download
- Apache Ant 1.8 1 Download
Problem: failed to create task or type ftp
Cause: the class org.apache.tools.ant.taskdefs.optional.net.FTP was not found.
This looks like one of Ant's optional components.
Action: Check that the appropriate optional JAR exists in
-/usr/share/ant/lib
-/Users/fed/.ant/lib
-a directory added on the command line with the -lib argument
Do not panic, this is a common problem.
The commonest cause is a missing JAR.
This is not a bug; it is a configuration problem
Apache Ant 1.8.1 Download
Download ant-apache-bcel-1.8.1.jar. Ant-apache/ant-apache-bcel-1.8.1.jar.zip( 7 k) The download jar file contains the following class files or Java source files. Then to build Apache EasyAnt from source, assuming you have Apache Ant™ 1.8.0+ and a jdk 1.5+ installed, then you only need to run the following command: ant clean run -Dtarget=dist Then you will find easyant-core.jar in target/artifacts.
My searches on the subject lead to multiple solutions, but they were aimed at earlier versions of Ant (1.7.X and below), somewhat complicated and turned out not to be what I needed for my version of Ant (1.8.1 on MacOSX 10.6.5). You'll see lots of instructions for setting your ANT_HOME environment variable, along with other settings, but that's not necessary with newer versions of Ant on MacOSX.
Most information I found on the web correctly pointed out that according to the Apache Ant install instructions for optional tasks, such as FTP, you need to have the Jakarta Oro 2.0.8 (text manipulation) and Commons-Net 2.0 (networking protocol support) jar libraries installed.
![Ant 1.8 1 Download Ant 1.8 1 Download](https://docs.wso2.com/download/attachments/9372250/14.png?version=1&modificationDate=1341817637000&api=v2)
What wasn't clear is that you also need to have ant-commons-net.jar installed. However, by default, the version of Ant that is installed via the MacOSX Developer Tools does not provide that library. So, even if you install Jakarta-Oro and Commons-Net, you'll still get the missing libraries error above. If you look in the ant/lib directory, all you'll see if ant-commons-net.pom, which is a Maven support file, but not the necessary jar file.
A handy command to show you what's installed or not in your version of ant is:
![Apache ant 1.8 1 download Apache ant 1.8 1 download](https://dazeworks.com/wp-content/uploads/2018/05/Ant-Migration-Tool.jpg)
![Download Download](https://antdownloadmanager.com/images/antdm_share_bt.png)
> ant -diagnostics
That generates a long list of features, installed jars, version numbers, etc. When I ran it, I confirmed that the FTP task was not available:
![1.8 1.8](https://thumbs.dreamstime.com/b/taylor-dooley-25588468.jpg)
-------------------------------------------
Tasks availability
-------------------------------------------
...
ftp : Not Available (the implementation class is not present)
...
Apache Ant 1.8.1 Download
![Ant 1.8 1 Download Ant 1.8 1 Download](https://i0.wp.com/images.sftcdn.net/images/t_app-cover-l,f_auto/p/dba9b6c4-9b35-11e6-bb18-00163ed833e7/233112589/antdownloadmanager-screenshot.png?w=735&ssl=1)
That said...
Apache Ant 1.8 1 Bin Zip Download
Ant 1.8 Download
- Find your ant/lib directory. Any jars placed in here are available to Ant at launch. The command 'whereis' or 'which' tells you where the executable of a command is located:
> whereis ant
> /usr/bin/ant
If you then do 'ls -la /usr/bin/ant' you'll see that on MacOSX that path is usually a symbolic link to /usr/share/ant.> ls -la /usr/bin/ant
> lrwxr-xr-x 1 root wheel 22 Nov 13 17:54 /usr/bin/ant -> /usr/share/ant/bin/ant
Ant the lib directory, which is where you will place your jar files, is located at /usr/share/ant/lib. - Download the Jakarta-Oro 2.0.8 and Commons-Net 2.0 jars and copy them to your ant/lib directory: /usr/share/ant/lib. (It's easiest to download the zip version of binaries, btw) Ex:
> sudo cp /path/to/jakarta-oro-2.0.8.jar /usr/share/ant/lib
> sudo cp /another/path/commons-net-2.0.jar /usr/share/ant/lib
You need to use 'sudo' since you need root permissions to copy files into the ant/lib directory. - Confirm your version of ant:
> ant -version
> Apache Ant version 1.8.1 compiled on September 21 2010
or> ant -diagnostics
> ------- Ant diagnostics report -------
Apache Ant version 1.8.1 compiled on September 21 2010 - Download a full/complete copy of the version of Ant you have installed. I downloaded a copy from the Apache Software Foundation mirror download site. I downloaded [MIRROR_SITE]/ant/binaries/apache-ant-1.8.1-bin.zip.
- Unzip full Ant installation, then copy ant-commons-net.jar to your ant/lib directory. Ex:
> sudo cp ~/Downloads/apache-ant-1.8.1/lib/ant-commons-net.jar /usr/share/ant/lib
Apache Ant 1.8 1 Download
Once you have the jars in place your Ant scripts which use the 'ftp' task will work.![](https://cdn-ak.f.st-hatena.com/images/fotolife/r/ruriatunifoefec/20200910/20200910011324.png)