You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "Coccia, Gino" <Gi...@mfl.co.uk> on 2003/02/19 12:33:52 UTC

jnuit, custom selector for fileset and CLASSPATH...

I've written a custom selector which I use to filter a fileset as follows :

<fileset dir="${test.classes}" includes="**/*.class">
	<custom
classname="uk.co.mfl.app.antext.fileset.selector.ImplementsInterfaceSelector
"
		classpathref="app.classpath.test">
	<param name="implements"
value="test.uk.co.mfl.cs.test.MFLTestInterface"/>
	</custom>          
</fileset>  

This custom selector checks that classes in the initial fileset implement a
particular interface before adding them to the filtered fileset.

However, this <fileset> is nested as follows:

<junit>
	<batchtest>
		<fileset>
		...
		</fileset>
	</batchtest>
</junit>

The problem I'm having is that my custom selector is unable to instantiate
any classes in the initial fileset, giving me a ClassNotFoundException.

So does anyone have any ideas about how the classpath and/or classpathref
parameters in the custom selector tag actually work? Or which classpath
these classes should be added to?

Thanks for any help,
Gino







***************************************************************************************
This email and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom they are addressed. 
If you have received this email in error please notify postmaster@mfl.co.uk immediately.

This footnote also confirms that this email message has been swept for the 
presence of computer viruses.
***************************************************************************************