2

这些文件的最新版本在哪里?

我不断收到以下错误:使用以下配置未找到引用 svnant.classpath :

<path id="path.svnant"> <pathelement location="${SVN.ANT.LIB}/svnant.jar"/> 
</path> 

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

所以我在写博客后添加了这些条目:

<path id="path.svnant">
<pathelement location="${SVN.ANT.LIB}/svnant.jar"/>
<pathelement location="${SVN.ANT.LIB}/svnClientAdapter.jar"/>
<pathelement location="${SVN.ANT.LIB}/svnkit.jar"/>
<pathelement location="${SVN.ANT.LIB}/svnjavahl.jar"/>
</path>
<typedef resource="org/tigris/subversion/svnant/svnantlib.xml" classpathref="path.svnant" />

但我似乎找不到这些文件或它们的最新版本。

请帮忙

4

2 回答 2

1

您可以在此处从 CollabNet 获取这些内容。有许多版本可用,请选择适合您的 Subversion 版本的版本。该页面中链接到的每个 svnant-xxxzip 下载都包含您需要的 jar 文件。您可能还需要 JavaHL

于 2012-08-26T11:45:56.093 回答
0

Just curious, why do you want to do Subversion commands in Ant?

Sometimes it's necessary. For example, if you use CruiseControl, you need to do the checkout for CruiseControl in your build.xml because CruiseControl doesn't do it.

However, most of the time, it's not a good idea. For example, you might use your build.xml to checkin the resulting built artifacts. This is not a good idea. You should be storing built artifacts in a release repositor where they can be available for other projects. Checking in large binary files into your Subversion repository will make your Subversion repository grow to tremendous size with little benefit. These built binaries take a lot of room and become obsolete in a matter of months.

We use Ant with Ivy. Our builds are done with Jenkins, and we use the mvm deploy:deploy-flle command in Jenkins to deploy our files into our Maven repository where Ant w/ Ivy can check them out for other projects. The stuff we deploy to other machines are kept in Jenkins.

Martin Clayton has answered you where you can find the files you need to get the Ant Subversion tasks working. However, my experience has been that it's simply easier just to use <exec> and execute Subversion commands directly. This way, you don't have to make sure that the Subversion API is installed and that it matches the Subversion client and server.

于 2012-08-26T13:56:34.220 回答