How can I get the version of a specific module in a deployed application on a WebSphere 8.5 server?
I tried the following commands.
Get all installed applications:
wsadmin> $AdminApp list
MyApplicationEAR
Get version of this application (MyApplicationEAR):
wsadmin> $AdminApp view MyApplicationEAR -buildVersion
Build-ID of application: SNAPSHOT_17-07-2014_16-33-28_rev_123
List all modules of this application:
wsadmin> $AdminApp listModules MyApplicationEAR
MyApplicationEAR#MyApplicationWeb.war+WEB-INF/web.xml
MyApplicationEAR#Toolbox.war+WEB-INF/web.xml
Get version of one module (MyApplicationWeb.war):
$AdminApp view MyApplicationEAR#MyApplicationWeb.war+WEB-INF/web.xml -buildVersion
WASX7015E: Exception while executing command: "$AdminApp view MyApplicationEAR#MyApplicationWeb.war+WEB-INF/web.xml -buildVersion". Exceptioninfo:
com.ibm.ws.scripting.ScriptingException: WASX7406E: The taskname buildVersion was not found in the application MyApplicationEAR.
But if I open the WebSphere admin console GUI (localhost:xxxx/ibm/console) and go to:
Applications >
Application Types >
WebSphere enterprise applications >
MyApplicationEAR >
MyApplicationEAR >
Display module build IDs
I can see the own versions of all modules.
The version of the EAR is stored like the version of each module in the META-INF/MANIFEST.MF under Implementation-Version: XXX.
Has somebody a hint, how to get these module versions with wsadmin (or with the Java AdminClient API)?