ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Laird NELSON <>
Subject Testing buildfile from inside TestCase?
Date Fri, 11 Jul 2003 12:29:31 GMT
I'm writing an ant taskdef.  I'd like to unit test it in JUnit by 
generating a simple buildfile with a <taskdef> element in it referring 
to my taskdef and executing Ant to make sure the buildfile (a) loads, 
(b) finds my taskdef and (c) executes it properly.

If I launch from inside my TestCase, 
my buildfile loads (i.e. ant starts up fine), but when the project 
parser hits the <taskdef> element, it cannot find my taskdef classes.  
Now, what's odd is that the test case from which I'm running ant is in 
the same package as the taskdef itself.  Both are therefore in the 
classpath, or I couldn't have run JUnit in the first place.

What's the proper way to unit test a taskdef?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message