无法创建任务或工作灯6.2键入战争建设者 [英] failed to create task or type war-builder in worklight 6.2
本文介绍了无法创建任务或工作灯6.2键入战争建设者的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用workklight 6.2,写以下Ant任务的基础上的Linux机器命令行WAR文件。
I am using workklight 6.2 and wrote following ant task to build war file on linux machine command line.
<taskdef resource="com/worklight/ant/defaults.properties">
<classpath>
<pathelement location="opt/IBM/Worklight/WorklightServer/worklight-ant-builder.jar"/>
</classpath>
</taskdef>
<target name="build-war">
<war-builder projectfolder="${basedir}"
destinationfolder="bin/"
warfile="bin/MyProject.war"
classesFolder="classes-folder"/>
</target>
当我执行任务用下面的命令蚂蚁-f /opt/MyWS/MyProject/build.xml集结战它给了我以下错误:
When I execute the task with following command "ant -f /opt/MyWS/MyProject/build.xml "build-war" it gives me following error :
Problem: failed to create task or type war-builder
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any <presetdef>/<macrodef> declarations have taken place.
ANT_HOME 设置为 /opt/IBM/Worklight/tools/apache-ant-1.8.4 。当我执行在Eclipse中相同的任务,它只是正常工作。
ANT_HOME is set to "/opt/IBM/Worklight/tools/apache-ant-1.8.4". When I execute the same task in eclipse, it just works fine.
推荐答案
看来路径jar文件设置不正确(您错过了根斜线):
It seems the path to the jar file is not set correctly (you missed the root slash):
<taskdef resource="com/worklight/ant/defaults.properties">
<classpath>
<pathelement location="/opt/IBM/Worklight/WorklightServer/worklight-ant-builder.jar"/>
</classpath>
</taskdef>
这篇关于无法创建任务或工作灯6.2键入战争建设者的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文