You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Prashant Neginahal <pr...@gmail.com> on 2011/12/08 16:13:22 UTC
web-app version in all app screens
Hi,
There is requirement to display the webapp.war version in all
application screens. How does maven help on this?
Many Thanks.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: web-app version in all app screens
Posted by Stephen Connolly <st...@gmail.com>.
It doesn't.
You can use Maven to help get the application version into a property
file on the classpath of the webapp. (Just as you can use other build
tools... but it is trivially easy with Maven (as it does this by
default /META-INF/maven/groupId/artifactId/pom.properties there is a
property "version" in there automatically))
Perhaps the best way is to query the manifest of a key class in your
application and use its "Implementation-Version" as your application
version... that would be the most portable way of all (providing your
version number corresponds to the surprisingly flexible version number
format required by Implementation-Version
But as to displaying that version on every page in your
application.... that is down to you.
If I were working with a Facelets/JSF application I could just modify
the templates that all pages are generated from and I would be sorted.
Other web application frameworks are similarly useful... if your app
is all custom .jsp pages, then you may be SOOL
On 8 December 2011 15:13, Prashant Neginahal <pr...@gmail.com> wrote:
> Hi,
>
> There is requirement to display the webapp.war version in all
> application screens. How does maven help on this?
>
> Many Thanks.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org