I downloaded 1.5 Beta1.
Now the date is right but generating the build number throws a
NullPointerException:
compile:
[propertyfile] Updating property file:
/webapp/neo-gate/buildversion.properties
[propertyfile] java.lang.NullPointerException
[propertyfile] at java.text.DecimalFormat.parse(DecimalFormat.java:797)
[propertyfile] at java.text.NumberFormat.parse(NumberFormat.java:282)
[propertyfile] at
org.apache.tools.ant.taskdefs.optional.PropertyFile$Entry.executeInteger(Pro
pertyFile.java:441)
[propertyfile] at
org.apache.tools.ant.taskdefs.optional.PropertyFile$Entry.executeOn(Property
File.java:344)
[propertyfile] at
org.apache.tools.ant.taskdefs.optional.PropertyFile.executeOperation(Propert
yFile.java:198)
[propertyfile] at
org.apache.tools.ant.taskdefs.optional.PropertyFile.execute(PropertyFile.jav
a:185)
[propertyfile] at org.apache.tools.ant.Task.perform(Task.java:313)
[propertyfile] at org.apache.tools.ant.Target.execute(Target.java:309)
[propertyfile] at org.apache.tools.ant.Target.performTasks(Target.java:334)
[propertyfile] at
org.apache.tools.ant.Project.executeTarget(Project.java:1216)
[propertyfile] at
org.apache.tools.ant.Project.executeTargets(Project.java:1160)
[propertyfile] at org.apache.tools.ant.Main.runBuild(Main.java:605)
[propertyfile] at org.apache.tools.ant.Main.start(Main.java:195)
[propertyfile] at org.apache.tools.ant.Main.main(Main.java:234)
[echo] Buildlabel is 20020503AM_
[echo] Builddate is 20020503AM
[echo] Buildnum is
BTW, the xml code is:
<propertyfile file="buildversion.properties" comment="Date, time and build
number of most recent build">
<entry key="buildnum" type="int" default="0000" operation="+" pattern="0000"
/>
<entry key="builddate" type="date" default="now" pattern="yyyyMMdda" />
<entry key="buildlabel" value="${builddate}_${buildnum}" />
</propertyfile>
<property file="buildversion.properties" />
<echo message="Buildlabel is ${buildlabel}" />
<echo message="Builddate is ${builddate}" />
<echo message="Buildnum is ${buildnum}" />
Thanks much.
Nolan
-----Original Message-----
From: Diane Holt [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 03, 2002 9:49 AM
To: Ant Users List
Subject: RE: propertyfile task returning wrong date
--- Nolan Ring <[EMAIL PROTECTED]> wrote:
> Actually my real question is why doesn't the snippet of xml for the
> propertyfile task work correctly, ie
> why doesn't it return the right date.
Looks to have been a bug -- fixed in Ant1.5.
Diane
=====
([EMAIL PROTECTED])
__________________________________________________
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness
http://health.yahoo.com
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>