How to get Maven Artifact version at runtime?

Posted by Alison G on Stack Overflow See other posts from Stack Overflow or by Alison G
Published on 2010-04-26T11:20:49Z Indexed on 2010/04/26 11:23 UTC
Read the original article Hit count: 382

Filed under:
|
|

I have noticed that in a Maven artifact's JAR, the project.version attribute is included in two files:

META-INF/maven/${groupId}/${artifactId}/pom.properties
META-INF/maven/${groupId}/${artifactId}/pom.xml

Is there a recommended way to read this version at runtime?

© Stack Overflow or respective owner

Related posts about maven-2

Related posts about java