On 22 Feb 07, at 11:02 AM 22 Feb 07, Roland Klein wrote:

Hi,

HowTo access project version programmatically in application?


Every JAR created with Maven embeds a properties which you can use to get the version from.

This is what we do:

http://svn.apache.org/repos/asf/maven/components/trunk/maven-core/src/ main/java/org/apache/maven/execution/DefaultRuntimeInformation.java

Jason.

At the moment we enter the version string manually in one of our classes. Is there a way to access the project version at runtime? One of my thoughts are to generate a Version class holding the version string, but is there a more convenient way?

Thanks in advance
Roland

--
Roland Klein
Tel: +49 40 65803 209
Fax: +49 40 65803 392
[EMAIL PROTECTED]

MTG Marinetechnik GmbH - Wandsbeker Koenigstr. 62 - D 22041 Hamburg

GF Dipl.-Ing. Ullrich Keil
Handelsregister: Abt. B Nr. 11 500 - Amtsgericht Hamburg Abt. 66
USt.-IdNr.: DE 1186 70571


---------------------------------------------------------------------
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]

Reply via email to