Reputation: 479
Currently I am trying to deploy an EAR file with wsadmin.sh. Using the following command:
wsadmin.sh -lang jython -conntype NONE -c "AdminApp.install('/tmp/Sample1.ear', '[ -appname Sample1 -contextroot /Sample1 -MapWebModToVH [[ Sample1 Sample1.war,WEB-INF/web.xml default_host]]]')"
However,
WASX7015E: Exception running command: "AdminApp.install('/tmp/sample1.ear', '[ -appname Sample1 -contextroot /Sample1 -MapWebModToVH [[ Sample1.war
Sample1.war,WEB-INF/web.xml default_host]]]')"; exception information:
com.ibm.ws.scripting.ScriptingException: WASX7111E: Cannot find a match for supp
lied option: "[Sample1, Sample1.war,WEB-INF/web.xml, default_host]" for task
"MapWebModToVH". The supplied option must match with the existing task data in
the application and the existing task data are: "["Sample Web Application" Sample1.war,WEB-INF/web.xml] "
Apparently the -MapWebModToVH should encorporate "Sample Web Application" as first value and not Sample1, but how should we do this since the parameters are seperated by a space. Using "Sample Web Application" as value with quotes does noet work. What is going wrong?
Upvotes: 2
Views: 952
Reputation: 5320
Use double quotes to enclose spaces within the single-quote-delimited string.
Since the outer string is delimited by single quotes, you can use double quotes within the quoted string value. (This is a feature of Python in general). E.g.:
AdminApp.install('/tmp/Sample1.ear', '[ -appname Sample1 -contextroot /Sample1 -MapWebModToVH [[ "Sample Web Application" Sample1.war,WEB-INF/web.xml default_host]]]')
Upvotes: 1