我正在尝试在安装新应用程序“MYAPP”后发出 wsadmin 命令来加载虚拟主机。但我找不到正确的语法。这是我的 ANT 任务的样子:
<target name="loadVirtualHost">
<wsAdmin
user="${was_user}"
password="${was_password}"
failonerror="${was_failonerror}"
washome="${was_home}"
profileName="${wsProfileName}"
command="$$AdminApp.edit(MYAPPEAR, [ -MapWebModToVH [[ myapp MYADDWEB.war,WEB-INF/web.xml default_host_ctst ]]])"/>
</target>
我得到的错误:
[wsadmin] WASX7015E: Exception running command: "$AdminApp.edit(MYAPPEAR, [ -MapWebModToVH [[ myapp MYAPPWEB.war,WEB-INF/web.xml default_host_ctst ]]])"; exception information:
[wsadmin] com.ibm.bsf.BSFException: error while eval'ing Jacl expression:
[wsadmin] invalid command name "myapp"
[wsadmin] while executing
[wsadmin] "myapp MYAPPWEB.war,WEB-INF/web.xml default_host_ctst "
[wsadmin] invoked from within
[wsadmin] "[ myapp MYAPPWEB.war,WEB-INF/web.xml default_host_ctst "
[wsadmin] invoked from within
[wsadmin] "-MapWebModToVH [[ myapp MYAPPWEB.war,WEB-INF/web.xml default_host_ctst ]"
[wsadmin] invoked from within
[wsadmin] "$AdminApp.edit(MYAPPEAR, [ -MapWebModToVH [[ myapp MYAPPWEB.war,WEB-INF/web.xml default_host_ctst ]]])"