ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Taner Diler <tan...@riskturk.com>
Subject how can I change value of property in runtime?
Date Thu, 25 Aug 2005 10:51:07 GMT
Hi,

I have a problem with properties that defined in xml. I'm  reading a 
property (has "test-0" value) from properties file and I try to change 
its value
by using ' <property name="${LOGICAL_SON_ISLEM_DIZINI}" value="test-1"/>'.

when I display value of the property by using echo, "test-0" is still 
being displayed.  How can I change value of the property in runtime?

<?xml version="1.0" ?>
<project name="structured" default="READER_CALLER" >
    <property name="SEPARATOR" value=";"/>
    <property name="rtdir" value="D:\\riskturk"/>
    <property name="RTDIR" value="D:\\riskturk"/>
    <property name="credit_context.name" value="KREDIRISK"/>
    <property name="credit_importer.name" value="CREDIT_IMPORTER"/>
    <property name="credit_importer.path" 
value="${rtdir}\\${credit_importer.name}"/>
    <property name="tomcat.home"  value="C:\\TOMCAT"/>
    <property name="lib.home" 
value="${rtdir}\\${credit_context.name}\\WEB-INF\\lib"/>
    <property name="credit_importer.porperties.file" 
value="${rtdir}\\${credit_importer.name}\\conf\\configuration.properties"/>

    <path id="project.class.path">
        <pathelement 
path="${rtdir}\\${credit_context.name}\\WEB-INF\\classes" />
        <fileset dir="${lib.home}">
            <include name="*.jar"/>
        </fileset>
        <fileset dir="${tomcat.home}\\common\\lib">
            <include name="servlet.jar"/>
        </fileset>
    </path>
   
    <!-- ${credit_importer.porperties.file} has 
${LOGICAL_SON_ISLEM_DIZINI} property. -->
    <target name="READ_FROM_PROPERTY_FILE">
        <property file="${credit_importer.porperties.file}"/>
       
        <!-- read ${LOGICAL_SON_ISLEM_DIZINI} property from property 
file. -->
        <!-- write ${LOGICAL_SON_ISLEM_DIZINI} property to screen as 
"test-0"-->
        <echo message="${LOGICAL_SON_ISLEM_DIZINI}"/>
    </target>

    <target name="READER_CALLER" depends="READ_FROM_PROPERTY_FILE">
        <!-- change value of ${LOGICAL_SON_ISLEM_DIZINI} property to 
"test-1"  in runtime -->
        <property name="${LOGICAL_SON_ISLEM_DIZINI}" value="test-1"/>
       
        <!-- but it is still writing "test-0" to screen -->
        <echo message="${LOGICAL_SON_ISLEM_DIZINI}"/>
    </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