ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Louise Pryor <louise.pr...@riskexplorer.com>
Subject Re: More optional task problems
Date Fri, 08 Jun 2001 15:03:33 GMT
At 07:42 08/06/01 -0700, you wrote:
>--- Louise Pryor <louise.pryor@riskexplorer.com> wrote:
> > I did that. echoing the classpath showed that optional.jar was
> > definitely  there. Getting rid of the taskdef stopped it being able
> > to find the junit task.
>
>Do you have fork set to true (on|yes)?  If you do, and you don't really
>want it fork'd, then either remove that or set it to false (off|no), and
>you shouldn't need to either <taskdef> the Junit task or add any nested
><classpath> stuff to your <junit> task. If you do want to run fork'd, then
>you'll need to reiterate (at least) the run-time classpath, so you'd need
>to include something like:
>   <classpath>
>     <pathelement path="${java.class.path}"/>
>   </classpath>
>in your <junit> task.
>
>If things still don't work, send your target so we can take a look at it.
>

Things behave differently if I set fork to no. Then it fails to find one of 
the junit classes. If I set fork to yes, and include the run-time classpath 
as you suggested, it works (well of course the test fails, but that's a 
minor problem!)

So it looks as if I can now get something working, by doing a taskdef and 
using fork="yes".

thanks

Louise



---------------------------------------------------------------
Louise Pryor                     Securities Finance Systems Ltd
louise.pryor@riskexplorer.com    CBC House
T: +44 131 272 2782              24 Canning Street
F: +44 131 272 2800              Edinburgh EH3 8EG
http://www.riskexplorer.com      Scotland


Mime
View raw message