You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Marc Eilens <Ma...@impress.com> on 2002/08/08 15:56:11 UTC

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
2000.
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);
        ]]>
        </script>
        <echo message="value: ${jonas.deploy.bean.list}"/>
    </target>

</project>

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
"jonas.deploy.bean.list".

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

Marc Eilens
Research & Development
Engineering

IMPRESS SOFTWARE AG
Rotenburger Straße 21
30659 Hannover

mailto:marc.eilens@IMPRESS.com
http://www.IMPRESS.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>