On 12/02/2014 23:15, Steve Newman wrote:
(Apologies for a very basic question, but I've searched the mailing list
archives and other online resources, and haven't been able to find an
answer.)
I'm trying to do a build using Ivy, and I can't get past square one; Ant
doesn't seem to recognize Ivy:
$ ant
Buildfile: /home/ec2-user/lz4/lz4-java-master/build.xml
init:
BUILD FAILED
/home/ec2-user/lz4/lz4-java-master/build.xml:86: Problem: failed to
create task or type antlib:org.apache.ivy.ant:resolve
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any <presetdef>/<macrodef> declarations have taken
place.
No types or tasks have been defined in this namespace yet
This appears to be an antlib declaration.
Action: Check that the implementing library exists in one of:
-/usr/share/ant/lib
-/home/ec2-user/.ant/lib
-a directory added on the command line with the -lib argument
I've downloaded the Ivy tarball, unpacked it, and put the .jar file and its
dependencies in /usr/share/ant/lib. I'm not sure what to try next. Any
suggestions?
Full details: the project I'm trying to build is
https://github.com/jpountz/lz4-java. (I am not the author.) This is on a
brand-new EC2 instance running the latest version of Amazon's default Linux
distro, which I believe is loosely related to CentOS. The complete list of
commands I executed to download and install Ivy and the lz4-java project
are as follows:
# install Ant and Ivy
cd ~
sudo yum install ant.noarch
mkdir ivy
cd ivy
wget
http://www.apache.org/dist/ant/ivy/2.3.0/apache-ivy-2.3.0-bin-with-deps.tar.gz
tar -xzf apache-ivy-2.3.0-bin-with-deps.tar.gz
sudo cp apache-ivy-2.3.0/lib/*.jar /usr/share/ant/lib
sudo cp apache-ivy-2.3.0/ivy-2.3.0.jar /usr/share/ant/lib
sudo chmod a+rx /usr/share/ant/lib/*
# install lz4
cd ~
mkdir lz4
cd lz4/
wget https://github.com/jpountz/lz4-java/archive/master.zip
unzip master.zip
cd lz4-java-master/
ant
Hi Steve,
I managed to reproduce your problem. I worked around it by running the
below before calling ant.
export ANT_HOME=/usr/share/ant/
This was based on a suggestion here
http://stackoverflow.com/questions/1909634/why-does-ant-ignore-task-jars-in-home-ant-lib
editing /etc/ant.conf didn't seem to have any impact on my ec2 instance.
Jason