ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erik Hatcher" <jakarta-...@ehatchersolutions.com>
Subject Re: 1.5Beta1 propertyfile task: Generating build number throws NullPointerException (was: propertyfile task returning wrong date)
Date Fri, 03 May 2002 16:11:57 GMT
If no one gets to this before I do, I'll have a look at it in a few weeks or
so.  Could you please file this as an official Bugzilla report against Ant
1.5Beta1 so that its not forgotten?

    Erik


----- Original Message -----
From: "Nolan Ring" <Nolan.Ring@Sun.Com>
To: "'Ant Users List'" <ant-user@jakarta.apache.org>
Sent: Friday, May 03, 2002 11:46 AM
Subject: 1.5Beta1 propertyfile task: Generating build number throws
NullPointerException (was: propertyfile task returning wrong date)


> 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>
>
>


--
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