----- Original Message ----- From: "Stephane Chauvin" <[EMAIL PROTECTED]>
Hi Stephane: > Hi Magesh, > I am very exciting to use the AntFilterReader, and I have 3 technical > questions. > I have: > <filterchain> > <filterreader > classname="org.apache.tools.ant.taskdefs.optional.serialver.SUIDFilterReader > "> > <classpath> > <pathelement path="${classpath}"/> > </classpath> > <param name="failonerror" value="true"/> > </filterreader> > </filterchain> > > and SUIDFilterReader extends from BaseParamFilterReader. > > 1) I cannot execute my SerialVer task (or any tasks) from SUIDFilterReader. Why would you want to execute your SerialVer task from within a filterreader? We do not encourage calling execute methods of tasks directly, anyway. > The BaseParamFilterReader.getProject() returns null. I saw that the > ChainReaderHelper doesn't set the project. Is there a raison, or can we have > this possibility? If you want getProject to not return a null, your Filter Reader must implement ChainableReader. Is it implementing it? Which task are you using to test your filter reader, btw? One of <copy>, <move>, <loadfile>? Or is it some other custom task? If it is a custom task, are you using ChainReaderHelper? I fyou are using ChainReadeHelper, are you invoking ChainReaderHelper.setProject(project)? > > 2) I notice that the filterreader element can support the <classpath> as > nested elements. The serialver program supports this argument, can I use > this element for that? How can I access to it? May be I have nothing to do, > the AntClassLoader do it for me? I am not very familiar with the serialver program that you refer to. But generally, if your <classpath> is 'ref-id'd, then you can reuse the same classpath for the filterreader also. > The BaseParamFilterReader implements the > code to get the parameters, but I didn't see something about the classpath. Classpath stuff is implemented in AntFilterReader. > > 3) If I throw a BuildException. How can I set the location? Can we have some > how access to the getLocation(), or it doesn't matter to set it in a new > exception? Currently you cannot get the reference to the containing task's location... > > Thanks a lot in advance, > Stephane. Cheers, Magesh *********************************************************** * Smile: A curve that can set a lot of things straight. * *********************************************************** -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>