maven-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benjamin Bentmann <benjamin.bentm...@udo.edu>
Subject Re: How to retrieve the current maven version from a plugin?
Date Wed, 21 Oct 2009 21:23:13 GMT
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]:

"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: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Mime
View raw message