Return-Path: Delivered-To: apmail-commons-dev-archive@www.apache.org Received: (qmail 38218 invoked from network); 15 Sep 2010 10:46:10 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 15 Sep 2010 10:46:10 -0000 Received: (qmail 68181 invoked by uid 500); 15 Sep 2010 10:46:09 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 67420 invoked by uid 500); 15 Sep 2010 10:46:05 -0000 Mailing-List: contact dev-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Developers List" Delivered-To: mailing list dev@commons.apache.org Received: (qmail 67409 invoked by uid 99); 15 Sep 2010 10:46:04 -0000 Received: from Unknown (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Sep 2010 10:46:04 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of sebbaz@gmail.com designates 209.85.216.43 as permitted sender) Received: from [209.85.216.43] (HELO mail-qw0-f43.google.com) (209.85.216.43) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Sep 2010 10:45:42 +0000 Received: by qwj8 with SMTP id 8so3525817qwj.30 for ; Wed, 15 Sep 2010 03:45:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=06w6PaFYqPhr09KOMFWvW+CgvWom0hVoHPhK2z2cufA=; b=d2nmBW1Od9HPq63XP+O0ZMllh8AzWTwZ8CJFoBa3bTWdP9fv4d0kJ+mqRbgj1m73l6 d87CvEZGuBpvdZWX76oHbpUlqv3hUCIAXL+DPXVgKs7Nz81v1ZXlUbNJfBN2FdMR44t2 lr8Dgl/Z0lVSLNvE8N45fvR6QLiQnEAtgq6tI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=HmHJ6J8ZgCQCAp8smAzJaApbQxV0ezsZy165dRs5hkf+qByxExq1SEkqYCFQKZX39E CkmDpmI2PypPjNosEe+naSHUw5ddGKCLCy5mBWb8tdBsUUJRnuZF7gaulueeom1N4adC HmxixsoxRJF7zcXy3/p7p9P/M54OIUAZr7ypc= MIME-Version: 1.0 Received: by 10.229.52.32 with SMTP id f32mr573795qcg.265.1284547509585; Wed, 15 Sep 2010 03:45:09 -0700 (PDT) Received: by 10.229.220.139 with HTTP; Wed, 15 Sep 2010 03:45:09 -0700 (PDT) In-Reply-To: <4C9083A6.3090609@healthcarion.de> References: <4C9083A6.3090609@healthcarion.de> Date: Wed, 15 Sep 2010 11:45:09 +0100 Message-ID: Subject: Re: Version classes From: sebb To: Commons Developers List Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org On 15 September 2010 09:28, Michael Lieshoff wrote: > =A0Hi there, > > i have problems in big environments where different versions of Apache > Commons projects exists, some older and others newer. I think in this cas= e a > version class is pretty, contains the version of the project. So a simple > version request at runtime would be possible and it's not needed to read > manifest informations. I searched about version classes in Apache Commons > projects but i dont find anything. > > Here is a simple code fragment: > > package org.apache.commons.lang; > public final class Version { > =A0 =A0private Version() { > =A0 =A0 =A0 =A0super(); > =A0 =A0} > =A0 =A0private final static String VERSION =3D "2.4"; > =A0 =A0public static String getVersion() { > =A0 =A0 =A0 =A0return VERSION; > =A0 =A0} > } > > What you think about it? I like the idea. Apache JMeter does the same. It also includes the last SVN revision of whatever workspace was used to build it. Since the version is available to Maven (or Ant) it could update (or perhaps create?) the version file as part of the build. If we decide to include the SVN revision as well, we could also add the SVN revision as a new manifest entry. Which makes me wonder - maybe another way to do this would be to have the getVersion() method read the Manifest entry? > Best regards > > Michael. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org > For additional commands, e-mail: dev-help@commons.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org For additional commands, e-mail: dev-help@commons.apache.org