commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: Version classes
Date Wed, 15 Sep 2010 10:45:09 GMT
On 15 September 2010 09:28, Michael Lieshoff
<michael.lieshoff@healthcarion.de> wrote:
>  Hi there,
>
> i have problems in big environments where different versions of Apache
> Commons projects exists, some older and others newer. I think in this case 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 {
>    private Version() {
>        super();
>    }
>    private final static String VERSION = "2.4";
>    public static String getVersion() {
>        return VERSION;
>    }
> }
>
> 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


Mime
View raw message