Maven 2: How to package current project version in a WAR file?
Posted
by Tom van Zummeren
on Stack Overflow
See other posts from Stack Overflow
or by Tom van Zummeren
Published on 2009-12-15T09:39:17Z
Indexed on
2010/04/30
6:27 UTC
Read the original article
Hit count: 243
I am using Maven 2 to build my Java project and I am looking for a way to present the current version number of the pom.xml to the user (using a Servlet or JSP for example).
As far as I can see, the best way would be that Maven packages the version number as a text file into the WAR. This allows me to read the version from that file and present it the way I want.
Does anyone know of a plugin that can do something like that for me? Maybe the WAR plugin can be configured to do so? Or maybe using some other approach all together?
© Stack Overflow or respective owner