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:

<script language="javascript">
    <![CDATA[
    importClass(Packages.net.sf.antcontrib.AntContribVersion);
    var ver = new AntContribVersion.main(java.lang.reflect.Array.newInstance(java.lang.String, 1));
    ]]>

</script>

Comments (Comment Moderation is enabled. Your comment will not appear until approved.)
BlogCFC was created by Raymond Camden. This blog is running version 5.9.3.000. Contact Blog Owner