Bug 689020 - Ant does not load antlib definitions
Summary: Ant does not load antlib definitions
Alias: None
Product: Fedora
Classification: Fedora
Component: apache-ivy
Version: 14
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Lubomir Rintel
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2011-03-18 20:23 UTC by Juan Camilo Prada Ojeda
Modified: 2011-07-06 09:23 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2011-07-06 09:23:43 UTC

Attachments (Terms of Use)

Description Juan Camilo Prada Ojeda 2011-03-18 20:23:07 UTC
Description of problem:
After installing ANT and apache-ivy package from fedora repo, trying to execute a build.xml file with an ivy task throws an error at the terminal

This is the output after running ant:

[juankprada@localhost ivyTest]$ ant
Buildfile: build.xml


/home/juankprada/Desktop/ivyTest/build.xml:3: Problem: failed to create task or type antlib:org.apache.ivy.ant:retrieve
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:
        -a directory added on the command line with the -lib argument

Total time: 0 seconds

Steps to Reproduce:
1. Install Ant and place any ant plugin inside either /usr/share/ant/lib or ~/.ant/lib
2. Execute ant in a build script that uses the plugin you just placed in ant's lib
3. Error is thrown
Actual results:
It is impossible to use Ant with other plugins

Expected results:
To have my application built

Additional info:
I did look for other bug reports on this, and found one that is closed and wont be fixed (god knows why) so I decided to report a new bug on this issue as it's been happening since fedora 10 as seen here https://bugzilla.redhat.com/show_bug.cgi?id=490542

Comment 1 Alexander Kurtakov 2011-03-18 20:33:51 UTC
Can you try putting creating /etc/ant.d/ivy file with the simple content of "ivy" and retry? Look at the ant-contrib files for details it contains proper integration.

Comment 2 Juan Camilo Prada Ojeda 2011-03-18 20:53:22 UTC
Created the /etc/ant.d/ivy file with "ivy" (without quotation marks) and tried again with no luck. Error is still the same.

I'm not sure of what files you mean?, any path in particular?

Comment 3 Juan Camilo Prada Ojeda 2011-03-18 20:57:49 UTC
Sorry, It seems that i mesed a bit the ivy isntallation. I just set everything back to default and after having /etc/ant.d/ivy file things seem to work

Does that mean that for every plugin I add to ~/.ant/lib I'll have to do the same?

Comment 4 Alexander Kurtakov 2011-03-18 21:13:22 UTC
Moving the bug to apache-ivy because it's not shipping the integration file. About your question the problem seems to be that the startup script is not adding ~/.ant/lib to the classpath. If you provide a patch I would happily apply it.

Comment 5 Alexander Kurtakov 2011-07-06 09:23:43 UTC
Ivy ant.d integration done.

Note You need to log in before you can comment on or make changes to this bug.