the class org.apache.tools.ant.taskdefs.optional.junit.JUnitTask was not found.

1,146 views
Skip to first unread message

Simon Ochsenreither

unread,
Jun 27, 2013, 2:00:46 PM6/27/13
to scala-i...@googlegroups.com
Hi,

I just checked out the repo on a new computer and I experienced this:

/home/soc/Entwicklung/scala/build.xml:1410: Problem: failed to create task or type junit
Cause: the class org.apache.tools.ant.taskdefs.optional.junit.JUnitTask was not found.
        This looks like one of Ant's optional components.
Action: Check that the appropriate optional JAR exists in
        -/usr/share/ant/lib
        -/home/soc/.ant/lib
        -a directory added on the command line with the -lib argument

Do not panic, this is a common problem.
The commonest cause is a missing JAR.

This is not a bug; it is a configuration problem


Is this supposed to happen? I always assumed that all dependencies were handled by pull-binary-libs.sh?

Thanks and bye,

Simon

Grzegorz Kossakowski

unread,
Jun 27, 2013, 2:12:30 PM6/27/13
to scala-internals
What command did you use? JUnit is resolved through Maven, see: https://github.com/scala/scala/blob/master/build.xml#L217

--
Grzegorz Kossakowski
Scalac hacker at Typesafe
twitter: @gkossakowski

Simon Ochsenreither

unread,
Jun 27, 2013, 2:30:13 PM6/27/13
to scala-i...@googlegroups.com
Ok, this explains it: The machine has no Maven installed!

Maybe it makes sense to add a better error message for this failure case?

Thanks a lot!

Simon

Grzegorz Kossakowski

unread,
Jun 27, 2013, 2:37:25 PM6/27/13
to scala-internals
On 27 June 2013 11:30, Simon Ochsenreither <simon.och...@gmail.com> wrote:
Ok, this explains it: The machine has no Maven installed!

Well, not entirely. We are using Maven Ant Tasks that allow one to download dependencies from Maven repository. AFAIK, those tasks do not have dependency on regular Maven being installed on the system. It must be something else. It would be good if you could check whether that Maven task is being run and if yes, why does it fail.

Simon Ochsenreither

unread,
Jun 27, 2013, 2:58:58 PM6/27/13
to scala-i...@googlegroups.com

Well, not entirely. We are using Maven Ant Tasks that allow one to download dependencies from Maven repository. AFAIK, those tasks do not have dependency on regular Maven being installed on the system. It must be something else. It would be good if you could check whether that Maven task is being run and if yes, why does it fail.

Is there a chance that this this command uses antRun underneath? (antRun is broken under Fedora: https://bugzilla.redhat.com/show_bug.cgi?id=428502, https://bugzilla.redhat.com/show_bug.cgi?id=428502, ...)
This made the invocation of pull-binary-libs.sh fail earlier, too. (I ran it manually.)

Grzegorz Kossakowski

unread,
Jun 27, 2013, 6:09:57 PM6/27/13
to scala-internals
I don't think so. I suggest just running Ant with `-debug` option and look at the log. I'm pretty sure it should tell you where things got wrong.
Reply all
Reply to author
Forward
0 new messages