本文介绍了如何从SVN检出与ANT任务吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我感兴趣的任何我可以创建一个Ant任务从Subversion签文件。我只是想通过命令行做结帐。我一直在使用Eclipse使用Ant和Subversion有一段时间了,但我的Ant和Subversion的知识有所欠缺,因为我靠Eclipse来连线到一起。

I'm interested in any way that I can create an Ant task to checkout files from SubVersion. I "just" want to do the checkout from the command line. I've been using Eclipse with Ant and SubVersion for a while now, but my Ant and SubVersion knowledge is somewhat lacking as I relied on Eclipse to wire it all together.

我一直在寻找SvnAnt溶为一体,这是。它可能工作得很好,但我得到的是NoClassDefFoundErrors。为了更经历了这可能看起来像一个简单的Ant配置问题,但我不知道这件事。我复制了svnant.jar和svnclientadapter.jar到我的Ant lib目录下。然后我试着运行以下命令:

I've been looking at SvnAnt as one solution, which is part of Subclipse from Tigris at http://subclipse.tigris.org/svnant/svn.html. It may work fine, but all I get are NoClassDefFoundErrors. To the more experienced this probably looks like a simple Ant configuration problem, but I don't know about that. I copied the svnant.jar and svnclientadapter.jar into my Ant lib directory. Then I tried to run the following:

<?xml version="1.0"?>

<project name="blah">

 <property environment="env"/>

 <path id="svnant.classpath">
  <pathelement location="${env.ANT_HOME}/lib"/>
  <fileset dir="${env.ANT_HOME}/lib/">
   <include name="svnant.jar"/>
  </fileset>
 </path>

 <typedef resource="org/tigris/subversion/svnant/svnantlib.xml" classpathref="svnant.classpath" />

 <target name="checkout">
  <svn username="abc" password="123">
   <checkout url="svn://blah/blah/trunk" destPath="workingcopy"/>
  </svn>
 </target>

</project>

要我获得以下响应:

build.xml:17: java.lang.NoClassDefFoundError: org/tigris/subversion/javahl/SVNClientInterface

我在Windows XP 32位运行SVN 1.7和1.3 SvnAnt

I am running SVN 1.7 and SvnAnt 1.3 on Windows XP 32-bit.

感谢您的指点!

推荐答案

如果你没有得到SvnAnt工作,你可以随时使用EXEC:

If you don't get SvnAnt working, you can always use exec:

<exec executable="/usr/local/bin/svn">
    <arg value="co" />
    <arg value="svn://repository/url" />
    <arg value="/destination/directory" />
</exec>

这篇关于如何从SVN检出与ANT任务吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-08 00:17