> From: Mark McKay [mailto:[EMAIL PROTECTED]
> 
> I'm using a utility from the x3d group to batch convert VRML97 files
> into X3D.  This is provided as a jar file, and provides no support to
> define it as a taskdef.
> 
> Currently, to translate sphere.wrl into sphere.x3d, I'm calling:
> 
>         <java classname="iicm.vrml.vrml2x3d.vrml2x3d"
> classpath="c:/java/x3d/Vrml97ToX3dNist.jar">

Just neat-picking, but using absolute pathnames in build files is
considered by some, including me, bad practice. Use a property to
locate external jar, which can be overridden on the command line.

>             <arg file="data/3d/sphere.WRL"/>
>             <arg file="data/3d/sphere.x3d"/>
>         </java>
> 
> This is great for translating only one file, but I'd like to translate
> an entire directory full of *.wrl into *.x3d.

That's the purpose of <apply>.

> Better yet, I'd like my
> script to be smart enough to only translate the files that are newly
> added or out of date.  Can this be done with ant?

I don't think <apply> is a 'smart' task, in the sense that it probably
processes all files, not just out-of-date ones... But Peter Reilly, of
Ant 1.6 fame (<macrodef>, <scriptdef>, <presetdef>, etc...) created an
<outofdate> task in Ant-Contrib (from SourceForge) that combined with
<apply> (or Ant-Contrib's <for> maybe also) would achieve what you want.

Please contribute back your solution ;-) --DD

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to