0

我的 build.xml 代码如下

<?xml version="1.0"?>
<!-- Sample build file used to retrieve svnant's sources -->
<project name="svn-test" basedir="." default="checkoutLatest">>       
  <!--  all properties are in build.properties --> 
  <property file="build.properties" /> 
  <!-- path to the svnant libraries. Usually they will be located in ANT_HOME/lib -->
  <path id="svnant.classpath">
    <fileset dir="${lib.dir}">
      <include name="**/*.jar"/>
    </fileset>
  </path>  
  <!-- load the svn task -->
  <typedef resource="org/tigris/subversion/svnant/svnantlib.xml" classpathref="svnant.classpath" />
  <target name="checkoutLatest">
    <mkdir dir="src_latest"/>
    <svn username="name" password="passwd">
     <status path="svn://sc........../"/>   
     <checkout url="svn://s.../" revision="HEAD" destPath="src_latest"/>  
    </svn>
  </target>   </project>

我可以使用https://协议执行 SVN 操作,但使用svn://协议会显示错误。下面是错误

> Buildfile: C:\build.xml checkoutLatest:
>       [svn] <Checkout> started ...
>       [svn] svn: Unknown host url path
>       [svn] svn: Unknown host url path
>       [svn] url path
>       [svn] <Checkout> failed !
> 
> BUILD FAILED C:\build.xml:21: Can't checkout
> 
> Total time: 3 seconds
4

1 回答 1

0

以前我使用的 SVNAnt 1.2 Jars 与 svn:// 协议存在问题。所以我从 [ http://subclipse.tigris.org/svnant.html][1]下载了 svnant-1.3.1 Jars

结帐代码:

 <target name="checkoutThis">
  	<mkdir dir="src_1"/>
  	
  	 <svnSetting svnkit="true" username="er351a" password="welcome2ibm" id="svn.settings"/>
  	
    <svn javahl="${javahl}">
    	<checkout url="svn://scm.it.att.com:14373/BGW_MIGR/trunk/BGWCommonEJB3" revision="HEAD" destPath="src_1" />	        
    </svn>

于 2014-10-15T16:23:13.680 回答