ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <dona...@locus.apache.org>
Subject Re: Javaworld Article about Ant
Date Tue, 24 Oct 2000 01:18:18 GMT
>What about:
>
><?xml version="1.0" encoding="utf-8"?>
><project name="myProject" default="default" basedir=".">
>
>  <taskdef name="function"
>classname="org.apache.tools.ant.taskdefs.optional.Function"/>
>
>  <target name="init">
>    <function name="printArg1">
>      <script language="javascript"> <![CDATA[
>        myProject.log('arg1: ' + arg1);
>      ]]></script>
>    </function>
>  </target>
>
>  <target name="default" depends="init">
>    <printArg1>
>      <param name="arg1" value="value of arg1"/>
>    </printArg1>
>
>    <echo message="arg1: ${arg1}"/>
>  </target>
></project>

how about ?

  <taskdef name="function" language="javascript">
      <![CDATA[
        myProject.log('arg1: ' + arg1);
      ]]>
  </taskdef>

Cheers,

Pete

*------------------------------------------------------*
| "Nearly all men can stand adversity, but if you want |
| to test a man's character, give him power."          |
|       -Abraham Lincoln                               |
*------------------------------------------------------*

Mime
View raw message