Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 342925 - ant 1.8.1 doesn't honor ANT_HOME
Summary: ant 1.8.1 doesn't honor ANT_HOME
Status: RESOLVED DUPLICATE of bug 300970
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Java (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-27 13:10 UTC by Yvan Royon
Modified: 2012-07-11 23:02 UTC (History)
0 users

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


Attachments
output of 'ant --execdebug -diagnostics' (ant-diagnostics.txt,14.13 KB, text/plain)
2010-10-28 15:31 UTC, Yvan Royon
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yvan Royon 2010-10-27 13:10:57 UTC
I have the same issue as bug http://bugs.gentoo.org/show_bug.cgi?id=231968 but with ant 1.8.1 instead of 1.7.1. I don't have enough privilege to reopen that bug, so here's a new one.

The /usr/bin/ant wrapper sets ANT_HOME as /usr/share/ant-core instead of /usr/share/ant. It might be the desired behavior for portage, but for end-users it's definitely not.

Reproducible: Always

Steps to Reproduce:
1. Get source code from a random Java project, which happens to use several random ant tasks. In my case, http://jogamp.org/jogl/doc/HowToBuild.html

2. Upstream says you just have to type 'ant'. You do that. It works on non-Gentoo machines. It fails on Gentoo with messages like "package org.apache.tools.ant.taskdefs.optional.junit does not exist".

3. The documentation at http://www.gentoo.org/proj/en/java/ant-guide.xml says that I should type e.g. 'ANT_TASKS="pmd checkstyle" ant' instead of 'ant'. I try 'ANT_TASKS="all" ant', but it still won't find junit. I try 'ANT_TASKS="junit" ant', now it finds junit, but it fails with "class org.apache.tools.ant.taskdefs.optional.Javah was not found".

4. Scream in horror and throw your chair on your coworker (who happens to be your boss).
Comment 1 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2010-10-28 10:18:05 UTC
This should really work and dunno why it doesn't. You don't have to define ANT_TASKS="all" because it's the default.
Is dev-java/ant installed with all deps of the same version?
What's output of 'ant --execdebug -diagnostics'?
Comment 2 Yvan Royon 2010-10-28 15:31:28 UTC
Created attachment 252385 [details]
output of 'ant --execdebug -diagnostics'


> Is dev-java/ant installed with all deps of the same version?

Yes, just checked:
$ emerge -pv $(qlist -I -C dev-java/ant-)

[ebuild   R   ] dev-java/ant-core-1.8.1  USE="-doc -source" 0 kB
[ebuild   R   ] dev-java/ant-nodeps-1.8.1  0 kB
[ebuild   R   ] dev-java/ant-antlr-1.8.1  0 kB
[ebuild   R   ] dev-java/ant-apache-log4j-1.8.1  0 kB
[ebuild   R   ] dev-java/ant-apache-oro-1.8.1  0 kB
[ebuild   R   ] dev-java/ant-apache-regexp-1.8.1  0 kB
[ebuild   R   ] dev-java/ant-apache-resolver-1.8.1  0 kB
[ebuild   R   ] dev-java/ant-commons-logging-1.8.1  0 kB
[ebuild   R   ] dev-java/ant-commons-net-1.8.1  0 kB
[ebuild   R   ] dev-java/ant-jdepend-1.8.1  0 kB
[ebuild   R   ] dev-java/ant-junit-1.8.1  0 kB
[ebuild   R   ] dev-java/ant-swing-1.8.1  0 kB
[ebuild   R   ] dev-java/ant-eclipse-ecj-3.5.2  0 kB
[ebuild   R   ] dev-java/ant-owanttask-1.1-r12  0 kB
[ebuild   R   ] dev-java/ant-apache-bcel-1.8.1  0 kB
[ebuild   R   ] dev-java/ant-apache-bsf-1.8.1  USE="python -javascript -tcl" 0 kB
[ebuild   R   ] dev-java/ant-trax-1.8.1  0 kB
[ebuild   R   ] dev-java/ant-apache-xalan2-1.8.1  0 kB
[ebuild   R   ] dev-java/ant-1.8.1  USE="X antlr bcel bsf commonslogging commonsnet jdepend log4j oro regexp resolver -jai -javamail -jmf -jsch -testutil" 0 kB

Total: 19 packages (19 reinstalls), Size of downloads: 0 kB


> What's output of 'ant --execdebug -diagnostics'?

Cf. attachment.
Also:
$ env | grep -i ant
ANT_HOME=/usr/share/ant
$ grep -ri ant /etc/portage/
/etc/portage/package.use:dev-java/ant -javamail -jsch

I don't think I'm doing anything unusual there.

Thanks.
Comment 3 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2012-07-11 23:02:50 UTC
Sorry for forgetting about this. Still no idea what went wrong here, everything you posted looks good and junit should be available.

The request for ANT_HOME itself is dupe of 300970.

*** This bug has been marked as a duplicate of bug 300970 ***