请教如何使用ant 从 svn上下载文件 的具体步骤
请教下大家 如何使用ant 从 svn上下载文件 的具体步骤
小弟我第一次接触这个东东,有点模糊。请大家帮忙。
我已经下载了svnant-1.3.0,并且用自带的build.xml生成了 src_1.3.0文件夹, 可是在这个里面没有找到build文件夹 也没有找到新生成svnant.jar.
继续不下去了, 哪位大侠帮忙指点下啊.
最好有详细的介绍
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
我也是跟你一样的错, 我也导入了这几个jar 到eclipse 里面去,但还是报这个错,不知道为什么
还是有错
具体错误如下:
Buildfile: C:program工程svnanttestsvn.xml
[typedef] Could not load definitions from resource org/tigris/subversion/svnant/svnantlib.xml. It could not be found.
export:
BUILD FAILED
C:program?·??¨?svnanttestsvn.xml:5: Could not create task or type of type: svn.
Ant could not find the task or a class this task relies upon.
This is common and has a number of causes; the usual
solutions are to read the manual pages then download and
install needed JAR files, or fix the build file:
- You have misspelt 'svn'.
Fix: check your spelling.
- The task needs an external JAR file to execute
and this is not found at the right place in the classpath.
Fix: check the documentation for dependencies.
Fix: declare the task.
- The task is an Ant optional task and the JAR file and/or libraries
implementing the functionality were not found at the time you
yourself built your installation of Ant from the Ant sources.
Fix: Look in the ANT_HOME/lib for the 'ant-' JAR corresponding to the
task and make sure it contains more than merely a META-INF/MANIFEST.MF.
If all it contains is the manifest, then rebuild Ant with the needed
libraries present in ${ant.home}/lib/optional/ , or alternatively,
download a pre-built release version from apache.org
- The build file was written for a later version of Ant
Fix: upgrade to at least the latest release version of Ant
- The task is not an Ant core or optional task
and needs to be declared using <taskdef>.
- You are attempting to use a task defined using
<presetdef> or <macrodef> but have spelt wrong or not
defined it at the point of use
Remember that for JAR files to be visible to Ant tasks implemented
in ANT_HOME/lib, the files must be in the same directory or on the
classpath
Please neither file bug reports on this problem, nor email the
Ant mailing lists, until all of these causes have been explored,
as this is not an Ant bug.
Total time: 95 milliseconds
把这么下面几个jar包都扔到 ant 的 lib 目录
svnant.jar , svnClientAdapter.jar , svnjavahl.jar , svnkit.jar
我试了一下,有几个地方不明白
1、svnant.jar在系统classpath中
这里改怎么设置呢 在系统变量里面设置 C:antlibsvnant.jar ? 我的ant 在C盘根目录
2、使用前需要将它依赖的类库放在ant安装目录下面的lib目录
依赖的类库有哪些呢?javasvn.jar、javasvn-javahl.jar、svnClientAdapter.jar?
以下是我的程序代码
<?xml version="1.0"?>
<project name="SVN Ant Test" default="export" basedir=".">
<typedef resource="org/tigris/subversion/svnant/svnantlib.xml" classpath="svnant.jar"/>
<target name="export">
<svn javahl="true" username="test" password="password" failonerror="false">
<export srcUrl="svn://192.168.0.112/svn/GameDesign//" destPath="c:/temp/src2" revision="HEAD"/>
</svn>
</target>
</project>
提示错误 [typedef] Could not load definitions from resource org/tigris/subversion/svnant/svnantlib.xml. It could not be found.
可是我解压c:/ant/lib/svnant.jar 发现有这个"org/tigris/subversion/svnant/svnantlib.xml"
难道是环境变量的问题?
你发完贴就已经有答案了,请看相关话题的第一帖。:)