我正在運行ant並遇到問題,它會提取我需要的jar文件。運行ant target並找不到antlib錯誤
[[email protected] salesforce-git]$ jar tf /usr/share/ant/lib/ant-salesforce.jar | grep antlib
com/salesforce/antlib.xml
運行我的劇本,我得到下面的輸出和錯誤:
bulkRetrieveAll:
[echo] **Bulk Retrieve**
[echo] ANT_HOME=/usr/share/ant
[echo] BASEDIR=/home/kyle/information-systems/salesforce-git
[echo] ANT_CORE_LIB=/usr/share/java/ant.jar
[echo] JAVA_VERSION=1.7
[echo] ANT_LIBRARY_DIR=/usr/share/ant/lib
[echo] classpath=/usr/share/java/ant.jar:/usr/share/java/ant-launcher.jar:/usr/share/java/jaxp_parser_impl.jar:/usr/share/java/xml-commons-apis.jar:/usr/share/java/ant/ant-contrib.jar:/usr/lib/jvm/java/lib/tools.jar:/usr/share/ant/lib/ant-bootstrap.jar:/usr/share/ant/lib/ant.jar:/usr/share/ant/lib/ant-launcher.jar:/usr/share/ant/lib/ant-salesforce.jar
[antlib:com.salesforce] Could not load definitions from resource com/salesforce/antlib.xml. It could not be found.
BUILD FAILED
/home/kyle/information-systems/salesforce-git/build.xml:16: Problem: failed to create task or type antlib:com.salesforce:bulkRetrieve
Cause: The name is undefined.
我的build.xml文件看起來是這樣的: ...
它錯誤在sf:bulkRetrieve行,但我不確定下一步去哪裏。我已經仔細檢查了xmlns行,甚至嘗試運行ant -lib ant-salesforce.jar bulkRetrieveAll
,結果相同。
非常感謝您的幫助。
我不認爲你的'build.xml'成了你原來的帖子。你可以發佈嗎? – 2013-05-06 14:22:25