You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by ko...@excite.co.jp on 2004/01/12 09:04:55 UTC
using for defining data type?
Hello,
Can I use <presetdef> task to pre-set data type like <fileset>?
It seems that it can be used for defining "my <fileset>", but
it cannot be used for using "my <fileset>". What I tried to do
is:
<?xml version="1.0"?>
<project>
<presetdef name="java.fileset">
<fileset>
<include name="**/*.java"/>
<include name="**/*.class"/>
<include name="**/*.jar"/>
</fileset>
</presetdef>
<property name="java.dir" value="c:/somewhere"/>
<target name="copy">
<copy todir="to">
<java.fileset dir="${java.dir}"/>
</copy>
</target>
</project>
With above build.xml, I run ant with -debug option:
C:\> ant -debug
:
+Datatype java.fileset org.apache.tools.ant.types.FileSet
:
BUILD SUCCESSFUL
Total time: 0 seconds
"java.fileset" seems to be defined correctly. But I run ant with
"copy" target option to actually use the new data type, I got
the following error:
C:\> ant copy
:
BUILD FAILED
C:\build.xml:14: The <copy> type doesn't support the nested "java.fileset"
element.
Thank you,
Koji
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org