Googling the maven web site for "root ClassLoader" turned up one promising
page, http://maven.apache.org/reference/developers/developer-guide.html.
However, the current page (generated 03 November) doesn't even contain the
word ClassLoader. Google's cached page (from 07 October) DOES mention it, at
least in the context of developing a plugin.

Now I get an "INTERNAL ERROR":
Reference made to goal 'java:jar-resources' which has no definition.

--Daniel Rabe

-----Original Message-----
From: Brett Porter [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 05, 2003 6:45 PM
To: 'Maven Users List'
Subject: RE: problems running ant tasks from maven


You probably need to add a junit dependency to your project. You might need
to put it in the root classloader (google the maven website).

Anyway, you can integrate your ant script into maven.xml really easily. I'd
recommend trying that. Actually, I'd recommend the test plugin above all of
these, although I'm assuming this doesn't suite your needs.

- Brett


> -----Original Message-----
> From: Daniel Rabe [mailto:[EMAIL PROTECTED]
> Sent: Thursday, 6 November 2003 12:33 PM
> To: '[EMAIL PROTECTED]'
> Subject: problems running ant tasks from maven
> 
> 
> I have an existing ant task set up to run junit. If I invoke
> it from the command line with "ant test", it works fine. I 
> want to integrate this into maven, so I added the following 
> to maven.xml:
> 
> <goal name="zzz">
>     <ant target="test" />
> </goal>
> 
> When I run "maven zzz" it fails (error messages below). Why
> would it not run from within maven when it runs fine from the 
> command line?
> 
> Thanks,
> Daniel Rabe
> 
> 
> BUILD FAILED
> File...... file:/C:/KangaHermes/ <file:/C:/KangaHermes/>
> Element... ant
> Line...... 36
> Column.... 24
> Could not create task or type of type: junit.
> 
> Ant could not find the task or a class this task relies upon.
> 
> This is common and has a number of causes; the usual solutions are to 
> read the manual pages then download and install needed JAR files, or 
> fix the build file:
>  - You have misspelt 'junit'.
>    Fix: check your spelling.
>  - The task needs an external JAR file to execute
>    and this is not found at the right place in the classpath.
>    Fix: check the documentation for dependencies.
>    Fix: declare the task.
>  - The task is an Ant optional task and optional.jar is absent
>    Fix: look for optional.jar in ANT_HOME/lib, download if needed
>  - The task was not built into optional.jar as dependent
>    libraries were not found at build time.
>    Fix: look in the JAR to verify, then rebuild with the needed
>    libraries, or download a release version from apache.org
>  - The build file was written for a later version of Ant
>    Fix: upgrade to at least the latest release version of Ant
>  - The task is not an Ant core or optional task
>    and needs to be declared using <taskdef>.
> 
> Remember that for JAR files to be visible to Ant tasks
> implemented in ANT_HOME/lib, the files must be in the same 
> directory or on the classpath
> 
> Please neither file bug reports on this problem, nor email
> the Ant mailing lists, until all of these causes have been 
> explored, as this is not an Ant bug. Total time: 9 seconds 
> Finished at: Wed Nov 05 18:32:23 MST 2003
> 

Reply via email to