I have a local.properties file, which contains only one value:
student.id=100
I created the following Ant script to increase the value of student.id
by 1 :
<target name="increase-id">
<!-- student.id is increased by 1, no problem -->
<propertyfile file="local.properties">
<entry key="student.id" type="int" operation="+" value="1" />
</propertyfile>
<!--The following echo always show me "Student ID: 1, why?"-->
<echo message="Student ID: ${student.id}"/>
</target>
Every time after I run command ant increase-id
, the value of student.id
in local.properties file is increased by 1. No problem here. But, the <echo>
message always show me Student ID: 1
Why?