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=17033>.
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=17033

propertyfile entry gives error for operation=+

           Summary: propertyfile entry gives error for operation=+
           Product: Ant
           Version: 1.5.1
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Blocker
          Priority: Other
         Component: Optional Tasks
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


Given:
<propertyfile file="${propertyfile.project}">
  <entry key="BUILD_NUMBER" type="int" operation="+" />
</propertyfile>

The following exception occurs:

file:C:/Autobuild/MxNet/1.0.0/Source Code/build.xml:77: value and/or default 
must be specified (key:BUILD_NUMBER)
        at 
org.apache.tools.ant.taskdefs.optional.PropertyFile$Entry.checkParameters
(PropertyFile.java:544)
        at org.apache.tools.ant.taskdefs.optional.PropertyFile$Entry.executeOn
(PropertyFile.java:386)
        at org.apache.tools.ant.taskdefs.optional.PropertyFile.executeOperation
(PropertyFile.java:197)
        at org.apache.tools.ant.taskdefs.optional.PropertyFile.execute
(PropertyFile.java:184)
        at org.apache.tools.ant.Task.perform(Task.java:319)
        at org.apache.tools.ant.Target.execute(Target.java:309)
        at org.apache.tools.ant.Target.performTasks(Target.java:336)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:371)
        at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:143)
[etc]

Sanity check:  Yes, the BUILD_NUMBER key property is definitely set in the 
property, and the variable definitely points to that file.  For example, if I 
include it via <property file="${propertyfile.system}" /> in this build.xml and 
<echo message="${BUILD_NUMBER}"/> it out, I get the value for it.

NOTE: This works fine in ant 1.4.1!  It is broken in ant 1.5.1!

Reply via email to