maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antonio Petrelli <antonio.petre...@gmail.com>
Subject Re: pom version neede in a java class to log it
Date Fri, 18 Jun 2010 15:54:22 GMT
2010/6/18 Varwig, Britta <britta.varwig@sap.com>:
> I think there is a plugin which can copy the actual pom version to a target\resource-file,
but I can not remember the name of plugin.
> Thanks for your hint.

It is done by the jar plugin (or other packaging plugins) by
configuring the manifest part:
<plugin>
	<groupId>org.apache.maven.plugins</groupId>
	<artifactId>maven-jar-plugin</artifactId>
	<version>2.3</version>
	<configuration>
		<archive>
         			<manifest>
           				<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
         			</manifest>
       			</archive>
	</configuration>
</plugin>

So you can read "Implementation-Version" property it from the manifest itself.

Antonio

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message