ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nolan Ring <Nolan.R...@Sun.Com>
Subject 1.5Beta1 propertyfile task: Generating build number throws NullPo interException (was: propertyfile task returning wrong date)
Date Fri, 03 May 2002 15:46:29 GMT
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:holtdl@yahoo.com]
Sent: Friday, May 03, 2002 9:49 AM
To: Ant Users List
Subject: RE: propertyfile task returning wrong date


--- Nolan Ring <Nolan.Ring@Sun.Com> 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

=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness
http://health.yahoo.com

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message