getting the current version of ant-contrib from inside Ant
Here's a simple little bit of code for getting the version of ant-contrib running in Apache Ant.
This uses the <script> task, although it would be just as easy (technically easier) to use the java task.
Mostly it's just kind of a useful example doing something java-ish (calling another classes main method) from inside the script tag:
<![CDATA[
importClass(Packages.net.sf.antcontrib.AntContribVersion);
var ver = new AntContribVersion.main(java.lang.reflect.Array.newInstance(java.lang.String, 1));
]]>
</script>

There are no comments for this entry.
[Add Comment] [Subscribe to Comments]