Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 163815 - Split ant does not consider dependencies for ant tasks
Summary: Split ant does not consider dependencies for ant tasks
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-25 20:52 UTC by Petteri Räty (RETIRED)
Modified: 2007-01-25 23:59 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Petteri Räty (RETIRED) gentoo-dev 2007-01-25 20:52:05 UTC
It seems that the ant-junit tasks needs the ant-trax task but the current setup does not handle this properly. We should probably do some dependency resolution here too.

    [junit] Test jdbm.recman.TestUtil FAILED
[junitreport] java.lang.ClassNotFoundException: org.apache.tools.ant.taskdefs.optional.TraXLiaison
[junitreport]   at java.net.URLClassLoader$1.run(URLClassLoader.java:203)
[junitreport]   at java.security.AccessController.doPrivileged(Native Method)
[junitreport]   at java.net.URLClassLoader.findClass(URLClassLoader.java:191)
[junitreport]   at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
[junitreport]   at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
[junitreport]   at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
[junitreport]   at java.lang.Class.forName0(Native Method)
[junitreport]   at java.lang.Class.forName(Class.java:169)
[junitreport]   at org.apache.tools.ant.taskdefs.XSLTProcess.loadClass(XSLTProcess.java:548)
[junitreport]   at org.apache.tools.ant.taskdefs.XSLTProcess.resolveProcessor(XSLTProcess.java:533)
[junitreport]   at org.apache.tools.ant.taskdefs.XSLTProcess.getLiaison(XSLTProcess.java:785)
[junitreport]   at org.apache.tools.ant.taskdefs.XSLTProcess.execute(XSLTProcess.java:300)
[junitreport]   at org.apache.tools.ant.taskdefs.optional.junit.AggregateTransformer.transform(AggregateTransformer.java:264)
[junitreport]   at org.apache.tools.ant.taskdefs.optional.junit.XMLResultAggregator.execute(XMLResultAggregator.java:158)
[junitreport]   at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
[junitreport]   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[junitreport]   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[junitreport]   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[junitreport]   at java.lang.reflect.Method.invoke(Method.java:606)
[junitreport]   at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
[junitreport]   at org.apache.tools.ant.Task.perform(Task.java:348)
[junitreport]   at org.apache.tools.ant.Target.execute(Target.java:357)
[junitreport]   at org.apache.tools.ant.Target.performTasks(Target.java:385)
[junitreport]   at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
[junitreport]   at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
[junitreport]   at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
[junitreport]   at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
[junitreport]   at org.apache.tools.ant.Main.runBuild(Main.java:698)
[junitreport]   at org.apache.tools.ant.Main.startAnt(Main.java:199)
[junitreport]   at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
[junitreport]   at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
Comment 1 Petteri Räty (RETIRED) gentoo-dev 2007-01-25 20:52:39 UTC
The error was done by jdbm-1.0 version bump src_test that I am working on when on:

GENTOO_VM=sun-jdk-1.7  CLASSPATH="" JAVA_HOME="/opt/sun-jdk-1.7.0.0_alpha06"
JAVACFLAGS="-source 1.3 -target 1.3" COMPILER="javac"
and of course, the output of emerge --info
Comment 2 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2007-01-25 23:59:14 UTC
(In reply to comment #0)
> It seems that the ant-junit tasks needs the ant-trax task but the current setup
> does not handle this properly.

Only <junitreport> task should be needing ant-trax, and that tasks is not used always when using junit. So you have to add ant-trax too. Updated the docs on wiki for this. If there is large number of ebuilds like this, we can consider makind ant-junit depend on ant-trax.

> We should probably do some dependency resolution here too.
 
I don't see what you mean here. All ant-* packages that really depend on others (compile-time) have this recorded in package.env (some have dependency on ant-nodeps). Say package A depends on B. It works if you specify only A in ANT_TASKS for eant (it will load B too), and for WANT_ANT_TASKS=A you are sure to have B installed too because A has B in both DEPEND and RDEPEND.