ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Eilens <Marc.Eil...@impress.com>
Subject changed property handling from 1.4 to 1.5 and scripting?!?
Date Thu, 08 Aug 2002 13:56:11 GMT
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:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message