worklight ant task app-deployer - Unauthorized err

2019-05-14 12: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条回答
放我归山
2楼-- · 2019-05-14 12:56

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.

查看更多
登录 后发表回答