Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 231968 - ant-1.7.1: /usr/bin/ant overrides ANT_HOME with /usr/share/ant-core, ant optional task no longer found
Summary: ant-1.7.1: /usr/bin/ant overrides ANT_HOME with /usr/share/ant-core, ant opti...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Java (show other bugs)
Hardware: AMD64 Linux
: High major (vote)
Assignee: Java team
: 231933 (view as bug list)
Depends on:
Reported: 2008-07-16 14:24 UTC by Bernd Pachur
Modified: 2008-07-16 15:54 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Bernd Pachur 2008-07-16 14:24:01 UTC
The environment varibale for ANT_HOME is set to /usr/share/ant but /usr/bin/ant overrides it with a hardcoded ANT_HOME=/usr/share/ant-core.

This behaviour effectively breaks ant's optional task, because they are no longer found.

Reproducible: Always

Steps to Reproduce:
1. echo $ANT_HOME and check that it is set to /usr/share/ant
2. run ant -diagnostics
3. see that ant.home is set to /usr/share/ant-core

Actual Results:  
Ant sees ant.home as /usr/share/ant-core while the env-variable is set to /usr/share/ant.
/usr/bin/ant does not use the env-variable.

Expected Results:  
Ant sees ant.home as /usr/share/ant and the optional tasks work.

With ant-1.7.0 everything was fine. This problem startet with ant-1.7.1.
Comment 1 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2008-07-16 14:43:56 UTC
Thanks for reporting, fixed in ant-core-1.7.1-r1. The cause isn't just hardcoding ANT_HOME=/usr/share/ant-core which is intentional and done in 1.7.0 too. The problem was that I forgot to update version in the script, so looked in wrong directory (/usr/share/ant/tasks-1.7.0) for tasks to load when ANT_TASKS="all" (or not set at all). 
Comment 2 gapon 2008-07-16 15:54:14 UTC
*** Bug 231933 has been marked as a duplicate of this bug. ***