Tip: Finding Metro version you are using

Note: This tip works properly only with a Metro 2.1 build or higher

As part of the mavenization, project migration and consolidation efforts mentioned in my previous update on Metro 2.1 related changes we have also looked into the ways how we can improve the identification of Metro bits used by our users. We are still not completely done with the solution (e.g. I would like to see some convenient command line script or such available to our users)  yet at least the current Metro identification String provides much more relevant information compared to the past.

So how can you find out what Metro version are you running on? The identification string is located in both OSGi-fied as well as non OSGi-fied version of the Metro runtime jar, i.e. webservices-osgi.jar or webservices-rt.jar respectively and it is stored in the com/sun/xml/ws/util/version.properties file under the build-version key. To print the value of this property, you can use following (bash) command:

$ unzip -p webservices-osgi.jar com/sun/xml/ws/util/version.properties | grep build-version


$ unzip -p webservices-rt.jar com/sun/xml/ws/util/version.properties | grep build-version

You should see an output similar to this one:

build-version=Metro/2.1-b25 (trunk-6664; 2010-12-31T11:31:15+0000) JAXWS-RI/2.2.3-promoted-b06 JAXWS/2.2

What does this value mean? It may be obvious that this artifact belongs to

  • Metro 2.1-b25 version
  • built from the Metro/WSIT SVN trunk revision 6664
  • on Dec 31st, 2010
  • based on JAX-WS RI version 2.2.3-promoted-b06
  • which implements JAX-WS 2.2 API specification

Thus if you want to see what version of Metro is bundled in the build of GlassFish 3.1 (or later) that you are using, just cd <gf-install>/glassfish/modules directory and run the OSGi version of the above-mentioned command. I shall also note that this information is also available in all HTTP based client requests as a value of the HTTP User-Agent request message header and as such will be visible in any HTTP traffic monitoring tool or in Metro HTTP message dumps.

Leave a Reply

Your email address will not be published. Required fields are marked *