蚂蚁没有加载salesforce任务定义吗? [英] Ant not loading salesforce task definitions?

查看:89
本文介绍了蚂蚁没有加载salesforce任务定义吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题

我正在尝试在Linux机器上使用Force.com迁移工具(自定义的蚂蚁库),但我一辈子都无法弄清楚如何让蚂蚁看到该库.我在做什么错了?

I'm trying to use the Force.com Migration Tool (a custom ant library) on a linux box and can't for the life of me figure out how to get ant to see that library. What am I doing wrong?

错误消息

BUILD FAILED
/home/ec2-user/ant/ucp/build.xml:48: Problem: failed to create 
task or type antlib:com.salesforce:retrieve
Cause: The name is undefined.

背景

我使用yum install ant安装了ant,然后将Force.com迁移工具(ant-salesforce.jar)放到了/usr/share/ant/lib中.运行ant -diagnostics时,我可以看到该库,但是该库的所有任务都没有(应该看到部署,检索等).我已经上传了要点,其中包含ant -diagnostics的完整输出.

I installed ant using yum install ant and then I dropped the Force.com Migration Tool (ant-salesforce.jar) into /usr/share/ant/lib. I'm able to see this library when I run ant -diagnostics, but none of the tasks for that library (should be seeing deploy, retrieve, etc.). I've uploaded a gist with the full output from ant -diagnostics.

-------------------------------------------
 ANT_HOME/lib jar listing
-------------------------------------------
ant.home: /usr/share/ant
ant-bootstrap.jar (19837 bytes)
ant-salesforce.jar (3293054 bytes)
ant.jar (1942059 bytes)
ant-launcher.jar (18418 bytes)

经过大量的谷歌搜索和手动阅读后,我尝试了以下操作,但均无济于事(注意:以上诊断未进行以下任何更改).我知道我缺少明显的东西:(

After lots of googling and manual reading I tried the following to no avail (NB: the above diagnostics is without any of the below changes). I know I'm missing something obvious :(

  1. 设置$ ANT_HOME export ANT_HOME=/usr/share/ant
  2. 设置权限chmod +x /usr/share/ant/lib/salesforce-jar
  3. 与组chown root:root /usr/share/ant/lib/salesforce-jar
  4. 通过-lib ant -lib /usr/share/ant/lib/salesforce-jar retrieve ...
  5. 上课
  6. 使用-lib ant -lib /usr/share/ant/lib retrieve ...
  7. 传递lib文件夹
  8. 将$ ANT_HOME添加到$ PATH export PATH=$PATH:$ANT_HOME/bin
  1. Setting $ANT_HOME export ANT_HOME=/usr/share/ant
  2. Fiddling with permissions chmod +x /usr/share/ant/lib/salesforce-jar
  3. Fiddling with groups chown root:root /usr/share/ant/lib/salesforce-jar
  4. Passing in class with -lib ant -lib /usr/share/ant/lib/salesforce-jar retrieve ...
  5. Passing in lib folder with -lib ant -lib /usr/share/ant/lib retrieve ...
  6. Adding $ANT_HOME to $PATH export PATH=$PATH:$ANT_HOME/bin

推荐答案

如何将ant-salesforce.jar保留在/home/ec2-user/ant/ucp下,然后将taskdef元素更改为如下所示:

How about keeping ant-salesforce.jar under /home/ec2-user/ant/ucp and then change the taskdef element to look like this:

<taskdef resource="com/salesforce/antlib.xml" classpath="ant-salesforce.jar" />

再次运行您的构建,看看情况是否好转.将JAR与build.xml放在同一文件夹中将帮助您消除权限问题.

Run your build again and see if things look better. Having the JAR in the same folder as build.xml will help you eliminate issues with permissions.

这篇关于蚂蚁没有加载salesforce任务定义吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆