ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Woo, Chen Ching" <c...@spss.com>
Subject setting property using <script> task
Date Mon, 07 Apr 2003 20:25:46 GMT
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 ?

Thanks.

output
======
c:>ant -f bogus.xml
Buildfile: bogus.xml

default:

myFunc:
     [echo] ${hello}

BUILD SUCCESSFUL
Total time: 4 seconds

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

Mime
View raw message