You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Kito Mann <ki...@virtua.com> on 2011/08/31 18:51:08 UTC

version info

Is there a way to tell programmatically at runtime exactly which version of
MyFaces is running?
---
Kito D. Mann | twitter: kito99 | Author, JSF in Action
Virtua, Inc. | http://www.virtua.com | JSF/Java EE training and consulting
http://www.JSFCentral.com - JavaServer Faces FAQ, news, and info | twitter:
jsfcentral
+1 203-404-4848 x3

* Listen to the latest headlines in the JSF and Java EE newscast:
http://blogs.jsfcentral.com/roller/editorsdesk/category/JSF+and+Java+EE+Newscast
* Keep up with the aftermath of the Oracle/Sun merger:
http://www.mergerspeak.com

Re: version info

Posted by Kito Mann <ki...@virtua.com>.
On Wed, Aug 31, 2011 at 4:28 PM, Bernd Bohmann <be...@atanion.com>wrote:

> For example:
>
> FacesContext.class.getPackage().getImplementationVersion()
>

Unfortunately, this returns null...

>
> or
>
> read the content of
>
> META-INF/maven/org.apache.myfaces.core/myfaces-api/pom.properties
> the property should be version
>

That would work, but since there may be more than one MyFaces JAR in the
classpath, this may not work (looks like the file is in one JAR, but not the
other).

>
> But I don't know from which version it works.
>
>
> Regards
>
> Bernd
>
>
>
>
> On Wed, Aug 31, 2011 at 6:51 PM, Kito Mann <ki...@virtua.com> wrote:
> > Is there a way to tell programmatically at runtime exactly which version
> of
> > MyFaces is running?
> > ---
> > Kito D. Mann | twitter: kito99 | Author, JSF in Action
> > Virtua, Inc. | http://www.virtua.com | JSF/Java EE training and
> consulting
> > http://www.JSFCentral.com - JavaServer Faces FAQ, news, and info |
> twitter:
> > jsfcentral
> > +1 203-404-4848 x3
> >
> > * Listen to the latest headlines in the JSF and Java EE newscast:
> >
> http://blogs.jsfcentral.com/roller/editorsdesk/category/JSF+and+Java+EE+Newscast
> > * Keep up with the aftermath of the Oracle/Sun merger:
> > http://www.mergerspeak.com
> >
>

Re: version info

Posted by Bernd Bohmann <be...@atanion.com>.
For example:

FacesContext.class.getPackage().getImplementationVersion()

or

read the content of

META-INF/maven/org.apache.myfaces.core/myfaces-api/pom.properties
the property should be version

But I don't know from which version it works.


Regards

Bernd




On Wed, Aug 31, 2011 at 6:51 PM, Kito Mann <ki...@virtua.com> wrote:
> Is there a way to tell programmatically at runtime exactly which version of
> MyFaces is running?
> ---
> Kito D. Mann | twitter: kito99 | Author, JSF in Action
> Virtua, Inc. | http://www.virtua.com | JSF/Java EE training and consulting
> http://www.JSFCentral.com - JavaServer Faces FAQ, news, and info | twitter:
> jsfcentral
> +1 203-404-4848 x3
>
> * Listen to the latest headlines in the JSF and Java EE newscast:
> http://blogs.jsfcentral.com/roller/editorsdesk/category/JSF+and+Java+EE+Newscast
> * Keep up with the aftermath of the Oracle/Sun merger:
> http://www.mergerspeak.com
>