ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Eilens <>
Subject RE: changed property handling from 1.4 to 1.5 and scripting?!?
Date Thu, 08 Aug 2002 14:08:29 GMT
Hi guys,

sorry for the inconvenience, I found a solution myself. Simply should have
taken a look in the code earlier.

The problem is that I'm modifying a copy of the Properties-Hashtable. Thus,
properties.put() won't do, but instead I can call setProperty() on the
project instance.


-----Original Message-----
From: Marc Eilens []
Sent: Donnerstag, 8. August 2002 15:56
To: ''
Subject: changed property handling from 1.4 to 1.5 and scripting?!?

Hello folks,

I'm bit in a trouble because some of my ant code does not work anymore since
my company switched from ANT 1.4.1 to ANT 1.5. We are working on Windows NT
In one message on this list I once found some code to manipulate a property
using JavaScript. What I have to do is to build up a string depending on the
values of some other properties.

Here's a short, simplified example:

<project name="JOnASSetup" default="install">
    <target name="install">
        <script language="javascript"> <![CDATA[
            properties = JOnASSetup.getProperties();
            a = 1;
            b = 1;
            sJonasDeployBeanList = "";
            if(a == 1) //simplified
                sJonasDeployBeanList = sJonasDeployBeanList + "a";
            if(b == 1) //simplified
                sJonasDeployBeanList = sJonasDeployBeanList + "b";
            properties.put("jonas.deploy.bean.list", sJonasDeployBeanList);
        <echo message="value: ${jonas.deploy.bean.list}"/>


In 1.4.1 this example would have written ",a,b" to the console. 1.5 writes
"${jonas.deploy.bean.list}", i.e. it did not set the property

Does anybody have an idea what I can do to achieve the old behaviour or how
I could achieve the same goal in another way???

Thanks in advance for your help,

Marc Eilens
Research & Development

Rotenburger Stra├če 21
30659 Hannover

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message