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 21505] New: - propertyfile does *2 instead of +1
Date Fri, 11 Jul 2003 12:57:05 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=21505>.
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=21505

propertyfile does *2 instead of +1

           Summary: propertyfile does *2 instead of +1
           Product: Ant
           Version: 1.5.2
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Optional Tasks
        AssignedTo: dev@ant.apache.org
        ReportedBy: ts@appliedgenerics.com


The propertyfile task gets confused if multiple targets are specified to Ant.

Here is an example:

   <target name="bugDemo1" depends="bugDemoInit">
      <echo>property is ${foo}</echo>
   </target>

   <target name="bugDemo2" depends="bugDemoInit">
      <echo>property is ${foo}</echo>
      <concat>
        <fileset file="bugPropFile"/>
      </concat>
   </target>

   <target name="bugDemoInit">
      <echo>property is ${foo}</echo>
      <propertyfile file="bugPropFile">
         <entry key="foo" default="0" value="1" operation="+" type="int"/>
      </propertyfile>
      <property file="bugPropFile"/>
      <echo>property is ${foo}</echo>
   </target>

Running Ant with arguments "bugDemo1 bugDemo2" causes the init target to be run
twice. The first time it increments the number in the file, but the second time
it doubles it.

If the init target is run three times then the number is incremented the first
time then doubled twice.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message