I'm using the Maven plugin was6-maven-plugin to deploy to websphere. When installing an application, there's a configuration value named "updateExisting" that should be false
if I am installing a new application, and true
if I am updating an existing application. I don't like having to manually toggle this value if I am fresh-installing/updating the application.
The way I see it, I can either add an uninstallApp
goal to always uninstall the application before installing it, but this seems a rather silly way to do it.
I've noticed that this plugin also has a goal wsListApps
that outputs all applications installed on the server. The output looks like this:
[INFO] [wsadmin] WASX7209I: Connected to process "server1" on node 1234Node02 using SOAP connector; The type of process is: UnManagedProcess [INFO] [wsadmin] DefaultApplication [INFO] [wsadmin] IBMUTC [INFO] [wsadmin] MyApplicationEAR [INFO] [wsadmin] ivtApp [INFO] [wsadmin] query
Is it possible for Maven to scan this output for the string "MyApplicationEAR" and set "updateExisting" to "true" if it is found, and leave it "false" otherwise?