Bug 689020

Summary: Ant does not load antlib definitions
Product: [Fedora] Fedora Reporter: Juan Camilo Prada Ojeda <juankprada>
Component: apache-ivyAssignee: Lubomir Rintel <lkundrak>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 14CC: akurtako, java-sig-commits, lkundrak, mmatejov, orion, pcheung
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-07-06 09:23:43 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

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

resolve:

BUILD FAILED
/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:
        -/usr/share/ant/lib
        -/home/juankprada/.ant/lib
        -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.
http://koji.fedoraproject.org/koji/buildinfo?buildID=251795