On Tue, 2004-03-30 at 18:33, Craig McClanahan wrote:
> Noel J. Bergman wrote:
>
> >"This class implements the upcoming standard of having
> >org.apache.project-name.Version.getVersion() be a standard way to get
> >version information."
> >
> >That's news to me. I suspect it is news to most. As far as I know, it may
> >be someone's strawman and/or wishful thinking, but this is the first I have
> >heard about it.
> >
> >
> >
> It's news to me too (maybe it's an XML-land thing?).
>
> It also sounds pretty much redundant with the existing JDK mechanisms
> for version discovery (which are based on information in
> META-INF/MANIFEST.MF). In particular, check out the javadocs for
> java.lang.Package and the associated information on Package Version
> Identification in the JDK docs. See, for example:
>
> http://java.sun.com/j2se/1.4.2/docs/guide/versioning/index.html
>
> If your project is a good citizen about creating MANIFEST.MF files in
> your JARs, you get this stuff for free.
That does make the Version.getVersion() method a bit redundant; it would
presumably just be:
return getPackage("org.apache.foo").getImplementationVersion();
However being able to run:
java -cp foo.jar org.apache.foo.Version
and get back a version# seems quite nice.
If sun provided a tool with their jre for checking version#s, that could
do the same job:
java-version-check -cp foo.jar org.apache.foo
but I didn't see any such tool in the versioning docs referred to above.
I wonder how sun's recommended approach works with Xalan/Xerces, given
that Sun tends to distribute classes from these projects as part of the
jre runtime? I'll have to try this later...
Regards,
Simon
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]