我正在尝试使用适用于本地开发人员服务器的 ant 脚本进行部署,当我迁移到生产环境时购买,这是我收到的错误:
deploy-environments:
[echo] **************Deploying all environments*************
[wladm] Error accessing http://127.0.0.1:9080/worklightadmin/management-apis/1.0/runtimes/RUNTIME/applications?locale=en_US: HTTP/1.1 404 Not Found
BUILD FAILED
/opt/IBM/Compilacion/scripts/app/build.xml:44: com.ibm.worklight.admin.restclient.RESTException: Error accessing http://127.0.0.1:9080/worklightadmin/management-apis/1.0/runtimes/RUNTIME/applications?locale=en_US: HTTP/1.1 404 Not Found
at com.ibm.worklight.admin.restclient.RESTClient.getResponse(RESTClient.java:1282)
at com.ibm.worklight.admin.restclient.RESTClient.getResponseWithTimeout(RESTClient.java:1359)
at com.ibm.worklight.admin.restclient.RESTClient.getPOSTResponse(RESTClient.java:1477)
at com.ibm.worklight.admin.restclient.RESTClient.getPOSTFileResponse(RESTClient.java:1499)
at com.ibm.worklight.admin.commands.DeployApp.getResponse(DeployApp.java:41)
at com.ibm.worklight.admin.restclient.ActionClient.execute(ActionClient.java:93)
at com.ibm.worklight.admin.ant.types.AbstractActionElement.executeCommand(AbstractActionElement.java:77)
at com.ibm.worklight.admin.ant.types.ActionElement.executeCommands(ActionElement.java:43)
at com.ibm.worklight.admin.ant.WladmTask.executeCommands(WladmTask.java:734)
at com.ibm.worklight.admin.ant.WladmTask.execute(WladmTask.java:473)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1405)
at org.apache.tools.ant.Project.executeTarget(Project.java:1376)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1260)
at org.apache.tools.ant.Main.runBuild(Main.java:853)
at org.apache.tools.ant.Main.startAnt(Main.java:235)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:285)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:112)
Total time: 3 seconds
这是我在 buil 中配置部署的部分.xml
<target name="deploy-environments">
<echo message="**************Deploying all environments*************"/>
<wladm url="${wl.server.url.deploy}${wl.admserverpath}" user="${wl.user}" password="${wl.pass}" secure="false">
<deploy-app runtime="${wl.runtime}" file="${app.output.folder}/APP_NAME-android-1.0.wlapp"/>
</wladm>
</target>
${wl.admserverpath} 变量是错误的,Worklight 管理员是 wladmin 的 chango