ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brown, Michael (Denver)" <Michael_Br...@jdedwards.com>
Subject RE: setting property using <script> task
Date Mon, 07 Apr 2003 20:57:56 GMT
 <![CDATA[
      project.setNewProperty("hello", "it's me !");       
    ]]> 

If I read this correctly, you need to use the name of the project you are
setting the property for:

 <![CDATA[
      test.setNewProperty("hello", "it's me !");       
    ]]> 
Additionally, I have used the setUserProperty function.  Not this one.  I
would have to research to tell you the difference, but you might try both.
I think the above should work.

Mike B.
-----Original Message-----
From: Woo, Chen Ching [mailto:cwoo@spss.com]
Sent: Monday, April 07, 2003 2:26 PM
To: Ant Users List
Subject: setting property using <script> task


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>

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

Mime
View raw message