如何在wsAdmin任务中编写AdminApp代码

时间:2013-08-29 13:13:34

标签: ant websphere wsadmin

我尝试在安装新应用程序“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 ]]])"

0 个答案:

没有答案