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: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to