我正在使用Maven插件was6-maven-plugin部署到websphere。在安装应用程序时,如果我正在安装新的应用程序,则会有一个名为"updateExisting"的配置值,它应该是false
,如果我正在更新现有的应用程序,则配置值应该是true
。如果我是全新安装/更新应用程序,我不喜欢必须手动切换此值。Maven - 动态pom文件?
我看到它的方式,我可以添加一个uninstallApp
的目标,在安装之前始终卸载应用程序,但这似乎是一种相当愚蠢的方式。
我注意到这个插件也有一个目标wsListApps
,它输出安装在服务器上的所有应用程序。输出看起来是这样的:
[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
是否有可能为Maven来扫描该输出字符串“MyApplicationEAR”,如果发现设置“updateExisting”到“真”,而放弃“假”?
有没有办法让'failOnError' *只适用于' uninstallApp'?我希望进程在'installApp'期间失败。 – FrustratedWithFormsDesigner 2013-03-20 21:24:35
是的。您必须在执行标签内定义配置。请阅读以下内容以获取更多详细信息:http://maven.apache.org/guides/mini/guide-configuring-plugins.html#Using_the_executions_Tag – ben75 2013-03-20 21:35:10