ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Reilly <peter.rei...@corvil.com>
Subject Re: Ant 1.6.0: <presetdef> for defining data type?
Date Tue, 13 Jan 2004 09:38:38 GMT
Stefan Bodewig wrote:

>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.
>  
>
This does work.
However the following should also work:

    <presetdef name="java.fileset">
        <fileset>
	    <include name="**/*.java"/>
	    <include name="**/*.class"/>
	    <include name="**/*.jar"/>
	</fileset>
    </presetdef>

        <copy todir="to">
	    <fileset ant-type="java.fileset" dir="${java.dir}"/>
        </copy>

But does currently not due to a bug...


Peter


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


Mime
View raw message