incubator-kato-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Poole <>
Subject Maven ant plugin - seems to be broken or is it just me!
Date Sat, 28 Nov 2009 15:39:15 GMT
Weird bug and solution  (or work around anyway)

When building  the kato.tck.execution.cjvmti module  we invoke an ant script
that  uses Junit.

When you run "mvm install" in the project directory it works ok.  So does
running in the parent kato.tck.execution module.  BUT - when you get to
kato.tck or higher you get this error message:
[INFO] An Ant BuildException has occured: The following error occurred while
executing this line:
C:\Documents and
Problem: failed to create task or type junit
Cause: the class was
not found.
        This looks like one of Ant's optional components.
Action: Check that the appropriate optional JAR exists in
        -the IDE Ant configuration dialogs

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

I had the right deps but they were not being honoured.   Eventally after
some trial and error ,  divide and conquer etc I finally found a solution. I
don't know if this is just serendipity or not.

Basically when kato.tck executes it builds the scenario modules and they
also use the ant plugin.   It seems that the plugin path for the ant plugin
is set on* first use* and is not changeable.   Net effect is that to get
when you run mvn install in the target module directly the ant plugin takes
the config from  the local pom and works.  Once you move up to a level in
the heirachy where another instance of the plugin is used you break!

The solution for me is to add in a hack dependency to junit in the other
instances of the ant plugin.  This is not good but I can't figure out if
this is intended behaviour or not.  (can't see why it should be so I assume
this is either a bug or I'm missing something fundamental)


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message