ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 19737] New: - <loadproperties> does not load updated file in same target
Date Wed, 07 May 2003 15:13:13 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19737>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19737

<loadproperties> does not load updated file in same target

           Summary: <loadproperties> does not load updated file in same
                    target
           Product: Ant
           Version: 1.5.3
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Core tasks
        AssignedTo: dev@ant.apache.org
        ReportedBy: mhilpert@gmx.de


<loadproperties> does not load the current file that was changed within the 
same target (or even the same run when the file is changed in another target 
that occurs in the "depends=" parameter of the target.

example: a target updates the build.number file with the <buildnumber> task. 
tha <loadproperties> task then reads this properties file. the resulting value 
of the build.number property is the value before <buildnumber> was called:

-------
    <target name="build.number++" depends="info" description="increase build 
number">
        <!-- increase build number in file build.number: -->
        <buildnumber file="${java}${fs}build.number"/>
        <touch file="${java}${fs}build.number"/>
        
        <!-- get new build number: -->
        <loadproperties srcfile="${java}${fs}build.number"/>
        <property name="bn" value="BUILD_NUMBER = ${build.number}"/>
        <echo message="Old bn=(nothing) new bn=${bn}"/>
        <!-- update build number in Version class: -->
        <replace file="${src}${fs}de${fs}icomps${fs}amc${fs}amr${fs}
Version.java" token="${oldbn}" value="${bn}"/>
    </target>
-------

Mime
View raw message