This is slick, but why not just have a templated Java file that you use a
filtered <copy> to replace the pieces?
I'm just curious, to compare/contrast the two different methods.
Erik
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 12, 2002 1:36 PM
Subject: DO NOT REPLY [Bug 9784] - BuildNumber task: make more extendable...
> 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=9784>.
> 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=9784
>
> BuildNumber task: make more extendable...
>
>
>
>
>
> ------- Additional Comments From [EMAIL PROTECTED] 2002-06-12 17:36 -------
> PropertyFile already allows finner control.
> This is a good solution for handling Properties.
>
> I use PropertyFile with a custiom task to build a
> a static class that has what you want.
> I have an task at https://sourceforge.net/projects/chalktools/
>
> It looks like
>
> <taskdef name="buildVersion"
> classname="com.chalko.tools.ant.BuildVersionGenerator" c/>
> <buildVersion
> name="${name}"
> toDir="${src.java.dir}"
> packageName="com.mypackage"
> debug="${build.debug}"
> major="${build.major}"
> minor="${build.major}"
> increment="${build.major}"
> tag="dev"
>
> />
> It generates
> this
> /* $Header:
> C:\workspace\JavaDevCert\src\com\flybynight\FlyByNightBuildVersion.java $
> */
> package com.flybynight;
>
> /**
> * A autogenerated BuiltVersion class.
> * @author com.chalko.tools.ant.BuildVersionGenerator Revision: 1.8
> * @version Fri Jun 07 02:48:37 PDT 2002
> *
> */
> public class FlyByNightBuildVersion extends
com.chalko.tools.rt.BuildVersion {
>
> public static final FlyByNightBuildVersion INSTANCE = new
> FlyByNightBuildVersion();
>
> private FlyByNightBuildVersion() {
> name="FlyByNight";
> date= new java.util.Date(1023443317875l); //Fri Jun 07 02:48:37
PDT 2002
> tag="development";
> major="0";
> minor="0";
> increment="0";
> host="baby/192.168.57.77";
> user="Owner";
> debug=true;
> }
>
>
> public final static FlyByNightBuildVersion getInstance( ) { return
INSTANCE;}
>
> }
>
> </target>
>
> The parent classes has getter for the fields and convinece methods for
standard
> forms ( major.minor.increment) etc.
>
> If there is interest I will relicense it, and donate it.
>
> --
> 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]>