[#9611] - failed to create task or type antlib:org.apache.ivy.ant:configure; Cause: The name is undefined.

Category:
Bug report
Priority:
Normal
Status:
Feedback Requested
Project: Severity:
Major
Resolution:
Open
Component: Reproducibility:
Always
Assigned to:
0

(Build failed when trying to build sample report, following Step 4 at http://community.jaspersoft.com/wiki/jasperreports-library-first-steps )

STEPS TO REPRODUCE:
1. cd jasperreports-6.3.1/demo/samples/barbecue
2. ant javac

EXPECTED OUTPUT:
Command successful.

ACTUAL OUTPUT:
~/Downloads/jasperreports-6.3.1/demo/samples/barbecue$ ant javac
Buildfile: /home/lukasz/Downloads/jasperreports-6.3.1/demo/samples/barbecue/build.xml

javac:

prepare-compile-classpath:

compile:

BUILD FAILED
/home/lukasz/Downloads/jasperreports-6.3.1/demo/samples/barbecue/build.xml:11: The following error occurred while executing this line:
/home/lukasz/Downloads/jasperreports-6.3.1/demo/samples/build.xml:40: The following error occurred while executing this line:
/home/lukasz/Downloads/jasperreports-6.3.1/build.xml:14: Problem: failed to create task or type antlib:org.apache.ivy.ant:configure
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/lukasz/.ant/lib
-a directory added on the command line with the -lib argument

Total time: 0 seconds
~/Downloads/jasperreports-6.3.1/demo/samples/barbecue$

WORKAROUND:
Method 1. Use -lib modifier.
Add: -lib /usr/share/java/ivy.jar
so run: ant javac -lib /usr/share/java/ivy.jar

Method 2. Add symlink.
sudo ln -s /usr/share/java/ivy.jar /usr/share/ant/lib/

NOTES:
Installed Jasper Library from Ubuntu packages: libjasperreports-java and libjasperreports-java-doc
Running 64-bit Ubuntu 16.04.1 LTS.

v6.3.1
czerwinskilukasz1's picture
Joined: Jun 14 2017 - 7:57am
Last seen: 3 months 2 days ago

1 Comment:

#1
  • Status:New» Feedback Requested
  • Assigned:» teodord

Hi,

Starting with version 6.2.1, we have removed all JARs from our distribution and introduced Ant Ivy to manage dependencies.
This means that you not only have to have Ant Build tool installed on your system, but you also need to have the Ant Ivy plugin installed to it.

We mention this in the readme file in the root folder of the project, where we direct people to the Ant documentation for installing Ivy.

This usually means you have to download the Ivy JAR file and copy it under the /lib folder of your Ant installation directory.

Thank you,
Teodor

Feedback