ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erik Hatcher" <jakarta-...@ehatchersolutions.com>
Subject Re: DO NOT REPLY [Bug 9784] - BuildNumber task: make more extendable...
Date Wed, 12 Jun 2002 20:02:41 GMT
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: <bugzilla@apache.org>
To: <ant-dev@jakarta.apache.org>
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 nick@chalko.com  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:ant-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>
>
>


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


Mime
View raw message