我试图启动WebSphere Liberty配置文件服务器(称为WL_UAT_Server)无法启动从命令行自由简介:无法创建任务或键入的antlib:com.ibm.websphere.wlp.ant:服务器
<project basedir="." default="help" name="myProject" xmlns:wlp="antlib:com.ibm.websphere.wlp.ant">
<target name="liberty-start">
<wlp:server id="test" installDir="/opt/IBM/WebSphere/Liberty" operation="start" serverName="WL_UAT_Server"/>
</target>
</project>
从以下命令:
ant -f /opt/myProject/build.xml "liberty-start"
,但系统是给以下错误:
/opt/myProject/build.xml:144: Problem: failed to create task or type antlib:com.ibm.websphere.wlp.ant:server
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.
No types or tasks have been defined in this namespace yet
This appears to be an antlib declaration.
Action: Check that the implementing library exists in one of:
-/usr/share/ant/lib
-/home/root/.ant/lib
-a directory added on the command line with the -lib argument
Total time: 2 seconds
后续荷兰国际集团的ant -diagonstics
命令的输出
-------蚂蚁诊断报告------- Apache Ant的版本1.7.1于2010年
-------------------------------------------
Implementation Version
-------------------------------------------
core tasks : 1.7.1
optional tasks : not available
-------------------------------------------
ANT PROPERTIES
-------------------------------------------
ant.version: Apache Ant version 1.7.1 compiled on April 26 2010
ant.java.version: 1.6
ant.core.lib: /usr/share/java/ant-1.7.1.jar
ant.home: /usr/share/ant
-------------------------------------------
ANT_HOME/lib jar listing
-------------------------------------------
ant.home: /usr/share/ant
ant.jar (1339582 bytes)
ant-launcher.jar (12243 bytes)
ant-bootstrap.jar (19013 bytes)
wlp-anttasks.jar (43990 bytes)
-------------------------------------------
USER_HOME/.ant/lib jar listing
-------------------------------------------
user.home: /root
No such directory.
4月26日编译的任何帮助赞赏。
你将Ant作为独立工具运行还是从Eclipse或其他开发工具运行? – Gas 2014-11-24 17:35:16
@气我从命令行运行它。 – 2014-11-24 17:44:56
虽然运气:-)。我想,也许你称它为Eclipse,因为它使用了不同的类路径和ANT_HOME。 – Gas 2014-11-24 17:50:49