ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "EJ Ciramella" <ejcirame...@upromise.com>
Subject expanding properties
Date Tue, 29 Jul 2008 14:20:42 GMT
Hello all - I've relied on a copy/expand step for deployments/builds for
years.

 

Recently, a twist has bubbled up.  If you have:

 

val1=something 

 

in foo.properties and:

 

val2=somethingelse 

val3=${val2}:${val1}

 

in bar.properties and then load them like this:

 

    <target name="go" >

        <property file="bar.properties" />        

        <property file="foo.properties" />

 

        <echo>This is a problem: ${blah}</echo>

        <!-- echoproperties/ -->

        <copy file="test.txt" tofile="copied.txt">

          <filterchain>

            <expandproperties/>

          </filterchain>        

        </copy>

    </target>

 

${val1} is left unexpanded during the copy/expand properties.  Now if in
the test.txt file, if I put ${val2}:${val1} directly in there, they are
properly expanded.  Additionally, if I uncomment the echoproperties
task, I can see everything is properly echoed out and everything has a
value.

 

Any suggestions?  This seems like a bug/issue/problem.


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message