我的 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