Sent from my [rhymes with tryPod] ;-)
On 21 Oct 2009, at 22:23, Benjamin Bentmann
<[email protected]> wrote:
Hervé BOUTEMY schrieb:
what about MavenProject.class.getPackage().getImplementationVersion
()?
That could be a good additional check because of its simplicity and
different data source. I wouldn't suggest to make it the only check
because of [0]:
what use a second source... what do we do if we get two different
answers?
I think we have to pick one version source as being definitive, if
that source has gone AWOL, then by all means check the others, but it
should be a sequence otherwise how should we resolve conflicts?
the pom.properties of maven-core is (if present) a very strong
indicator of the maven version.
the implementation-version is somewhat weaker, as we are depending on
the classloader building the info and the manifest being correct (and
potentially having the implementation details defined for the package)
so I see that as a secondary source. :-(
"Null is returned if no package object was created by the class
loader of this class."
Benjamin
[0] http://java.sun.com/javase/6/docs/api/java/lang/Class.html#getPackage%28%29
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]