You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Mofeed Shahin <mo...@dsto.defence.gov.au> on 2004/01/09 05:10:14 UTC

developing my own fileset.

Hi,

I'm attempting to develop my own fileset, and I'm having problems.
Is it actually possible to do ?

This is what my ant build.xml looks like :

<target name="desktop">
    <taskdef name="ejardep"
      classname="mof.core.ant.JarTask"
      classpathref="invision.dist.classpath">
    </taskdef>

    <typedef name="modulefileset"
        classname="mof.core.ant.ModuleFileSet"
        classpathref="mof.dist.classpath">
    </typedef>

    <ejardep module="ui.desktop">
      <modulefileset dir=".">
        <include name="foo"/>
      </modulefileset>
    </ejardep>
</target>


my ejardep task currently extends MatchingTask so that the Fileset stuff 
should work, but it doesn't appear to like it.
I get :
The <ejardep> task doesn't support the nested "modulefileset" element.

It doesn't even work if I try a normal fileset either.

So I guess I have 2 questions.
1 - how do get a Task to understand filesets. (I already extend MatchingTask)
2 - how do I write my own Fileset ?

Mof.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: developing my own fileset.

Posted by Stefan Bodewig <bo...@apache.org>.
On Fri, 9 Jan 2004, Mofeed Shahin <mo...@dsto.defence.gov.au>
wrote:

> I'm attempting to develop my own fileset, and I'm having problems.
> Is it actually possible to do ?

Yes. See ZipFileSet or ClassFileSet in Ant for example.

> my ejardep task currently extends MatchingTask so that the Fileset
> stuff should work,

MatchingTask doesn't support filesets in any way.

> but it doesn't appear to like it.  I get : The <ejardep> task
> doesn't support the nested "modulefileset" element.

You have to add a method addModulefileset(FileSet) to the class
implementing ejardep to support plain filesets.

> 1 - how do get a Task to understand filesets.

The same way you make a task understand any nested elements.
<http://ant.apache.org/manual/develop.html#writingowntask> point 5 and
the links from there.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org