worklight ant task app-deployer - Unauthorized error when WL console security is active

人走茶凉 提交于 2019-12-12 09:49:14

问题


I'm trying to deploy an application to a WL Server v5.0.5 using the provided ant task app-deployer.

Here the simple buildfile I use:

<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." name="deployWL">
   <target name="deploy_application">
      <taskdef resource="com/worklight/ant/defaults.properties">
         <classpath>
            <pathelement location="C:/Worklight50/WorklightServer/worklight-ant.jar"/>
         </classpath>
      </taskdef>
      <app-deployer worklightServerHost="http://localhost:9087/worklight" deployable="C:/temp/UnisTestAdapters-common.wlapp"/>
   </target>
</project>

Access to the WL Server console has been protected using the documented "WAS security option 1 procedure" (ie, modified web.xml in worklight.war).

When I run the ant process I receive the following error:

C:\temp>C:\apache-ant-1.8.4-bin\bin\ant -buildfile test.xml deploy_application
Buildfile: C:\temp\test.xml
deploy_application:
[app-deployer] Feb 18, 2013 1:39:23 PM com.worklight.ant.deployers.AbstractDeployerTask logDeployResponse
[app-deployer] SEVERE: Unauthorized;
BUILD SUCCESSFUL
Total time: 1 second

If I run the same ant script with WL console unprotected, everything works fine.

Is it possible to use the ant scripts in a secured WL Server scenario ?

How can I propagate valid credential during apps deployment ?


回答1:


There is no way to do it in the current version of IBM Worklight (it is in the backlog). You can deploy an application or adapter manually or you can remove the protection when deploying an application or adapter with ANT.



来源:https://stackoverflow.com/questions/14952319/worklight-ant-task-app-deployer-unauthorized-error-when-wl-console-security-is

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!