Return-Path: Delivered-To: apmail-jakarta-ant-dev-archive@jakarta.apache.org Received: (qmail 57951 invoked by uid 500); 8 Sep 2001 22:32:13 -0000 Mailing-List: contact ant-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk Reply-To: ant-dev@jakarta.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list ant-dev@jakarta.apache.org Received: (qmail 57942 invoked from network); 8 Sep 2001 22:32:13 -0000 Message-ID: <018101c138b6$4fb2b640$6501a8c0@GILAMONSTER> From: "Erik Hatcher" To: References: <5.1.0.14.0.20010906002419.0275b2e8@mail.grassroots-tech.com><5.1.0.14.0.20010904143459.029f19a8@mail.grassroots-tech.com><5.1.0.14.0.20010906002419.0275b2e8@mail.grassroots-tech.com> <5.1.0.14.0.20010906171807.027e9390@mail.grassroots-tech.com> <002b01c1387c$4e03da20$6501a8c0@GILAMONSTER> Subject: Re: BuildInfo Task Date: Sat, 8 Sep 2001 15:33:38 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.3018.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.3018.1300 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N [sorry if this came through twice, I'm rearranging the e-mail addresses I'm using to subscribe to lists] You can put the os.name property (or any other Ant built-in or user-defined property) in a property file using the task. Here's how I do it: Yes, it would take a couple of steps to auto-increment a number in a properties file, then load that properties file to get its value for use in file naming. Erik ----- Original Message ----- From: "Stephen Oostenbrink" To: Sent: Saturday, September 08, 2001 11:30 AM Subject: Re: BuildInfo Task > Erik, > > Hmmm this is kind of what I have done. Looking at the description the only > information I would not be able to set using the PropertyFile task is the > operating system the build is done on. I get this using the system property > 'os.name'. I guess the task could be extend to incorporate this > functionality. I am guessing I would first have to run the PropertyFile task > and then load the property file, so that I could use the the properties to > create the release version to append to the zip file name I am generating. > > Thanks for the feedback. > > Stephen > > ----- Original Message ----- > From: "Erik Hatcher" > To: > Sent: Saturday, September 08, 2001 5:38 PM > Subject: Re: BuildInfo Task > > > > Stephen, > > > > How does your task differ from the functionality already available in the > > optional task? (IMHO, this should be a built-in task). > > > > I'm accomplishing something similar to what you describe by building a > > version.properties file into a WAR file and have written a bean accessor > > class for it as well as a Taglib that allows the version to be shown in > JSP > > pages easily. I'm currently not doing any auto-incrementing, just > capturing > > the CVS tag that was used in the build, but can do > > incrementing/decrementing of int and date property values and appending of > > string values. > > > > Erik > > > > ----- Original Message ----- > > From: "Stephen Oostenbrink" > > To: > > Cc: > > Sent: Saturday, September 08, 2001 5:34 AM > > Subject: BuildInfo Task > > > > > > > Hi, > > > > > > I have created a task that creates a release version using a property > > files > > > as its input. > > > > > > The release version has the following format: > > > > > > > > > __[date stamp] > > > > > > - release number: Is the release number for this version of the > > application. > > > This number is formatted in the form X_Y_Z, where X is the major build > > > number, Y the minor build number and Z the patch number. > > > - build number: Is the number of builds that have been performed for the > > > current release. This number is increased after each call to the task. > > > - date stamp: optionally a date stamp can be added to the release > version. > > > > > > This release version can be used to name a release package so that it is > > > easily identified (example: my_app_1_0_0_35.zip). If required the > property > > > file can be added to the applications jar file. Using a utility class > this > > > information can be displayed and used by customers to indicate what > > version > > > / build of an application they are using > > > > > > Each time this task is called the build number is increased and the new > > > build number, build platform and the build date is written back to the > > > property file. > > > > > > I would like to submit this task and the example utility class, that > > > displays the build information, as an enhancement. Does anyone think > this > > > could be a handy enhancement? And if so how do I go about submitting it? > > > > > > - Stephen > > > >