--- Dominique Devienne <[EMAIL PROTECTED]> wrote:
> I wanted to run <antdoc> on the current build file (whose absolute
> filename is in ${ant.file}), but <antdoc> doesn't have a 'file'
> attribute, only a <fileset> subelement.
[snip
> If you know of a better way to do this, thanks to let me know.
<target name="getBuildFile">
<script language="javascript"> <![CDATA[
file = new java.io.File(projname.getProperty("ant.file"));
projname.setUserProperty("buildfile.name", file.getName());
]]>
</script>
</target>
If you want to also get the dir, add:
projname.setUserProperty("buildfile.dir", file.getParent());
Diane
=====
([EMAIL PROTECTED])
__________________________________________________
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>