ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephane Chauvin <SChau...@cardiff.com>
Subject RE: [SUBMIT] SerialVer tasks
Date Thu, 11 Apr 2002 23:18:53 GMT
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.
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?

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? The BaseParamFilterReader implements the
code to get the parameters, but I didn't see something about the classpath.

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?

Thanks a lot in advance,
Stephane.

>Yes, it makes sense to write a special filterreader for this.
>Instead of having replacesuid as a task, implement it as a
>filterreader...  If you do so, you can automatically use
>it in <copy>, <move>, <loadfile> (and a few other tasks in the
>future).  Your task need not bother about creating the actual
>file, etc.  It can be delegated to the parent task that uses
>the filterreader.

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message