【问题标题】:S3 upload using ant task使用 ant 任务进行 S3 上传
【发布时间】:2011-01-20 13:17:55
【问题描述】:

我正在尝试使用 ant 将文件上传到 s3 存储桶。 为此我添加了

1.awstasks-0.3.jar
2.jets3t-0.8.0.jar
3.commons-httpclient-3.1.jar
4.commons-logging-1.1.1.jar
5.java-xmlbuilder-0.4.jar

这是我要执行的任务:-

<taskdef name="S3Upload" classname="dak.ant.taskdefs.S3Upload">
   <classpath refid="classpath.compile" />
</taskdef>
<target name="upload">
  <S3Upload verbose="true" accessId="myaccesskey" secretKey="je+mysecretkey" bucket="bucketname" publicRead="true">
  <fileset dir="lib" includes="mail.jar" />
  </S3Upload>
</target>

运行任务后显示以下错误:-

java.lang.NoSuchMethodError: org.jets3t.service.impl.rest.httpclient.RestS3Service.(Lorg/jets3t/service/security/AWSCredentials;)V

【问题讨论】:

    标签: ant upload amazon-s3


    【解决方案1】:

    看起来这种方法在0.8.0 版本的jets3t 中不可用。或许你应该试试jets36-0.7.4.jar

    【讨论】:

      猜你喜欢
      • 2015-07-07
      • 2011-04-16
      • 2014-02-14
      • 2011-02-07
      • 2019-03-04
      • 1970-01-01
      • 1970-01-01
      • 2012-02-14
      • 1970-01-01
      相关资源
      最近更新 更多