Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/ant/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Deployment 用于部署的Worklight ant任务_Deployment_Ant_Ibm Mobilefirst - Fatal编程技术网

Deployment 用于部署的Worklight ant任务

Deployment 用于部署的Worklight ant任务,deployment,ant,ibm-mobilefirst,Deployment,Ant,Ibm Mobilefirst,我正在用这个 它告诉我这样做一个蚂蚁目标 <target name="Deploy App"> <app-deployer deployable="${build.apps.dir}/app.wlapp" worklightServerHost="http://${customConfig.worklightServer.host}:${customConfig.worklightServer.port}/${customConfig.runtime}

我正在用这个

它告诉我这样做一个蚂蚁目标

<target name="Deploy App"> 
    <app-deployer deployable="${build.apps.dir}/app.wlapp"
        worklightServerHost="http://${customConfig.worklightServer.host}:${customConfig.worklightServer.port}/${customConfig.runtime}" 
        userName="admin" password="admin" />
</target>
然而,当我用wladm创建目标时,它告诉我

 Problem: failed to create task or type wladm
 Cause: The name is undefined.
 Action: Check the spelling.
 Action: Check that any custom tasks/types have been declared.

这不完全是对您的问题的回答,但若您不需要Ant,可以在命令行中使用wladm。见


wladm命令位于[WorklightInstallDir]/shortcuts

中。导致上述错误消息“无法创建任务或键入wladm”的最常见原因有:

  • 在当前Ant脚本中,
    此时尚未执行。您可以将它放在不同的目标中,而不是在当前目标之前执行。修复方法是将其列在公共初始化目标或任何目标之外的
    目录下
  • 引用了一个不存在的文件或
    worklight ant deployer.jar的旧版本
  • 加载
    resource=“com/worklight/ant/defaults.properties”
    ,但在6.2中它需要加载
    resource=“com/worklight/ant/deployers/antlib.xml”

您忘记了文档的链接。谢谢伊丹,我已经更新了帖子。@伊丹纳德您对此有何评论?没有,下面给了您评论(答案)。谢谢!实际上,这里告诉我们加载resource=“com/worklight/ant/defaults.properties”我现在将尝试您的解决方案。我觉得奇怪的是,它找到了appdeployer任务,并告知它已被弃用,提供了一个解决方案,但却没有找到提供的解决方案???更改资源无效。它告诉我:执行这一行时发生了以下错误:jar:file:/C:/Users/xpto/workspaceLuna/worklightapp/buildTools/buildJars/worklight-ant-builder.jar/com/worklight/ant/deployers/antlib.xml:23:taskdef class com.ibm.worklight.admin.ant.WladmTask无法使用classloader AntClassLoader找到[C:\Users\xpto\workspaceLuna\worklightapp\buildTools\buildJars\worklight ant builder.jar]build.xml/worklightapp/buildTools第67行Ant构建文件问题您需要使用worklight-Ant-deployer.jar而不是worklight-Ant-builder.jar。或者,如果您试图在同一个Ant脚本中同时使用这两个脚本,请按照以下方法解决冲突:谢谢,但我正在尝试为我的应用程序编写一个自动构建和部署任务脚本。因为IBM文档告诉我这是可能的,所以我尽量不诉诸于此。
 [echo] Worklight Ant task version 6.2.0.00.20140613-0730
 Problem: failed to create task or type wladm
 Cause: The name is undefined.
 Action: Check the spelling.
 Action: Check that any custom tasks/types have been declared.