Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 9931 invoked from network); 20 Apr 2004 04:55:20 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 20 Apr 2004 04:55:20 -0000 Received: (qmail 70955 invoked by uid 500); 20 Apr 2004 04:54:50 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 70902 invoked by uid 500); 20 Apr 2004 04:54:49 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 70871 invoked from network); 20 Apr 2004 04:54:48 -0000 Received: from unknown (HELO dnsinet.rzf-nrw.de) (193.109.238.66) by daedalus.apache.org with SMTP; 20 Apr 2004 04:54:48 -0000 Received: from z011104.bk.fin.local (z011104.bk.fin.local [193.109.238.140]) by dnsinet.rzf-nrw.de (8.12.10/8.12.10) with ESMTP id i3K4svZY023255 for ; Tue, 20 Apr 2004 06:54:57 +0200 Received: by z011104.bk.fin.local with Internet Mail Service (5.5.2657.72) id ; Tue, 20 Apr 2004 06:53:59 +0200 Message-ID: <879A5AD5DD0ED511891F0003473A9B560E23EFE0@Z011004> From: Jan.Materne@rzf.fin-nrw.de To: user@ant.apache.org Subject: RE: Format of Ant's version string ? Date: Tue, 20 Apr 2004 06:54:57 +0200 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2657.72) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C42693.A0A74020" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N ------_=_NextPart_001_01C42693.A0A74020 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable That IS the full code :-) Save the "" code as define-checkAnt.xml and the other "" as build.xml. Then open a shell in that directory and type "ant". But it needs Ant 1.6. Jan > -----Original Message----- > From: Srikrishna.Partha@wellsfargo.com > [mailto:Srikrishna.Partha@wellsfargo.com] > Sent: Monday, April 19, 2004 8:59 PM > To: user@ant.apache.org > Subject: RE: Format of Ant's version string ? >=20 >=20 > Can you provide the full code as I am a newbie?=20 >=20 > -----Original Message----- > From: Jan.Materne@rzf.fin-nrw.de [mailto:Jan.Materne@rzf.fin-nrw.de]=20 > Sent: Sunday, April 18, 2004 10:45 PM > To: user@ant.apache.org > Subject: RE: Format of Ant's version string ? >=20 > The property ant.version contains the buildnumber and the=20 > compile-date. > I=B4d written a snippet for storing the individual infos as = properties: >=20 > > > importClass(java.text.SimpleDateFormat); > importClass(java.util.Locale); >=20 > // String evaluation of 'ant.version' string > // e.g: 'Apache Ant version 1.6beta3 compiled on=20 > December 5 > 2003' > string =3D project.getProperty("ant.version"); > version =3D string.substring(string.indexOf("Ant=20 > version")+12, > string.indexOf("compiled on")-1); > compiled =3D=20 > string.substring(string.indexOf("compiled on")+12); >=20 > // Get the compiled date: 'December 5 2003' > dateParser =3D new SimpleDateFormat("MMM d yyyy",=20 > Locale.US); > compiledDate =3D dateParser.parse(compiled); >=20 > compiledYear =3D (new > SimpleDateFormat("yyyy")).format(compiledDate); > compiledMonth =3D (new SimpleDateFormat("M") > ).format(compiledDate); > compiledDay =3D (new SimpleDateFormat("d") > ).format(compiledDate); >=20 > project.setNewProperty("ant.version.number", version); > project.setNewProperty("ant.version.compiled", compiled); > project.setNewProperty("ant.version.compiled.year", > compiledYear); > project.setNewProperty("ant.version.compiled.month", > compiledMonth); > =20 > project.setNewProperty("ant.version.compiled.day", compiledDay); > ]]> > > >=20 >=20 > > > > >=20 >=20 > Jan >=20 >=20 > > -----Original Message----- > > From: Rich Wagner [mailto:richmwagner@hotmail.com] > > Sent: Sunday, April 18, 2004 9:07 PM > > To: user@ant.apache.org > > Cc: richmwagner@hotmail.com > > Subject: Format of Ant's version string ? > >=20 > >=20 > > I've written a simple utility to find the "version.txt" file in the = > > "ant.jar" of a given Ant installation, and the utility=20 > looks for the: > >=20 > > VERSION=3D > >=20 > > line in the "version.txt" file. So far, I know that=20 > "" can=20 > > be of the forms: > >=20 > > x.y > > x.y.z > >=20 > > where "x", "y" and "z" are integers. For instance, I've seen "1.5" = > > and "1.6.1", among others. > >=20 > > However, are there other possibilities I'm not aware of ? =20 > > For instance, for > > beta releases (which I've never downloaded personally), is=20 > the string=20 > > something like "x.y.z beta" ? > >=20 > > Or could there be other variations, like "1.6.1a" ? > >=20 > > Please let me know, so that I can have confidence that my version=20 > > string finder/parser is coded correctly... > >=20 > > Thanks in advance, > > Rich Wagner > >=20 > > _________________________________________________________________ > > Free up your inbox with MSN Hotmail Extra Storage! Multiple plans=20 > > available. > > = http://join.msn.com/?pgmarket=3Den-us&page=3Dhotmail/es2&ST=3D1/go/o > nm00200362ave/direct/01/ >=20 >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org > For additional commands, e-mail: user-help@ant.apache.org >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org > For additional commands, e-mail: user-help@ant.apache.org >=20 ------_=_NextPart_001_01C42693.A0A74020--