ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Conor MacNeill <co...@cortexebusiness.com.au>
Subject Re: setting property using <script> task
Date Mon, 07 Apr 2003 23:50:21 GMT
On Tue, 8 Apr 2003 06:25 am, Woo, Chen Ching wrote:
> I need to do some processing using the <script> task and set a project
> property at the end, but it doesn't seem to work. Can some one point me to
> the right direction ?
>

Don't use antcall. It sets the property in the sub-project but the calling 
project is unaffected. Try this instead


<?xml version="1.0" encoding="UTF-8"?>
<project name="test" default="default" basedir=".">
  <target name="default" depends="myFunc">
    <echo message="${hello}"/>
  </target>
  <target name="myFunc">
        <script language="javascript">
    <![CDATA[
      project.setNewProperty("hello", "it's me !");
    ]]>
        </script>
  </target>

</project>


Conor


-- 
Conor MacNeill
Blog: http://codefeed.com/blog/

Mime
View raw message