<filesets> like any datatypes in Ant provides a id/refid mechanism.
If you define a fileset giving an id you can refer to that via refid.
<path id="srcfiles">
<fileset id="srcfiles.fs" dir="/data/devel/java">
<include name="**/*.java"/>
</fileset>
</path>
<target name="doc">
<javadoc destdir="${localdoc}" verbose="off">
<fileset refid="srcfiles.fs"/>
</javadoc>
</target>
Jan
> -----Urspr�ngliche Nachricht-----
> Von: Hans Deragon [mailto:[EMAIL PROTECTED]
> Gesendet am: Montag, 8. November 2004 16:44
> An: [EMAIL PROTECTED]
> Betreff: How to use a FileSet defined outside of javadoc target?
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Greetings.
>
>
> Newbie here with ant 1.6.2. How can I use a FileSet
> defined outside of my
> javadoc target for specifying source files?
>
> javadoc comes with the sourcepathref attribute, but their is no
> sourcefilesref attribute. How can I perform a similar function?
>
> Here is some code that explains what I would like to do:
> (does not work
> because sourcefilesref does not exist).
>
>
> - ---->
> <path id="srcfiles">
> <fileset dir="/data/devel/java">
> <include name="**/*.java"/>
> </fileset>
> </path>
>
> <target name="doc">
> <javadoc sourcefilesref="srcfiles" destdir="${localdoc}"
> verbose="off"/>
> </target>
> <----
>
> Any clue on how to do something similar? "srcfiles" is
> used by other
> targets and therefore I do not want to copy it into the "doc"
> target, trying
> to avoid duplication.
>
>
> Best regards,
> Hans Deragon
> - --
> Consultant en informatique/Software Consultant
> Deragon Informatique inc. Open source:
> http://www.deragon.biz http://facil.qc.ca (Promotion du libre)
> mailto://[EMAIL PROTECTED] http://autopoweroff.deragon.biz
> (Logiciel)
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.1 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFBj5Q0kn1Tn1exbkgRAp+sAKCS7bV+cA6rqveuElaJZbYECnu2rACeJeFe
> Re29dWX3pVGSmOXERFGvmqU=
> =75Im
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>