ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: Ant 1.6.0: <presetdef> for defining data type?
Date Tue, 13 Jan 2004 07:41:45 GMT
On Tue, 13 Jan 2004, koji sekiguchi <koji_sekiguchi@excite.co.jp>
wrote:

> Can I use <presetdef> task to pre-set data type like <fileset>?

Yes and no.  You can define them, but not use the new types as nested
elements that don't support type-polymorphism for filesets.  AFAIK
there is no single task that would support it for now.

> What I tried to do is:
>     <presetdef name="java.fileset">
>         <fileset>
> 	    <include name="**/*.java"/>
> 	    <include name="**/*.class"/>
> 	    <include name="**/*.jar"/>
> 	</fileset>
>     </presetdef>
> 
>         <copy todir="to">
> 	    <java.fileset dir="${java.dir}"/>
>         </copy>

Try

  <java.fileset dir="${java.dir}" id="java.dir-fileset"/>

  <copy todir="to">
    <fileset refid="java.dir-fileset"/>
  </copy>

instead.  Not as compact, but should work.

Stefan

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


Mime
View raw message