ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Woo, Chen Ching" <c...@spss.com>
Subject RE: setting property using <script> task
Date Tue, 08 Apr 2003 14:06:16 GMT
Thanks, Conor.  It works like a charm!

-----Original Message-----
From: Conor MacNeill [mailto:conor@cortexebusiness.com.au]
Sent: Monday, April 07, 2003 6:50 PM
To: Ant Users List
Subject: Re: setting property using <script> task


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/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message