我从其他人那里获得了一个使用svnant的ant构建文件,但是我遇到了让它工作的问题。我将导致我问题的部分提取到一个单独的文件中:
<project name="rev-check macrodef">
<sequential>
<!-- ant contrib task definition -->
<taskdef resource="net/sf/antcontrib/antlib.xml">
<classpath>
<pathelement location="C:/rms-it-apps/ant/taskdefs/ant-contrib-1.0b3.jar"/>
</classpath>
</taskdef>
<taskdef resource="org/tigris/subversion/svnant/svnantlib.xml" loaderref="svnant.loader">
<classpath>
<pathelement location="C:/rms-it-apps/ant/taskdefs/svnant-1.3.1/lib/svnant.jar"/>
<pathelement location="C:/rms-it-apps/ant/taskdefs/svnant-1.3.1/lib/svnClientAdapter.jar"/>
<pathelement location="C:/rms-it-apps/ant/taskdefs/svnant-1.3.1/lib/svnjavahl.jar"/>
</classpath>
</taskdef>
</sequential>
<!-- <svn svnkit="false" javahl="false"> -->
<svn>
<info target="C:/dev/workspace/rmsitpew/PEW/src" />
<wcversion prefix="wc" path="C:/dev/workspace/rmsitpew/PEW/src" />
</svn>
<echo>Here 1</echo>
当我尝试仅使用<svn>
标记运行它时,我得到以下输出:
C:\dev\svnant>runant
C:\dev\svnant>C:\Programs\eclipse\plugins\org.apache.ant_1.8.2.v20120109-1030\bi
n\ant.bat
Buildfile: C:\dev\svnant\build.xml
[svn] Missing 'javahl' dependencies on the classpath !
BUILD FAILED
C:\dev\svnant\build.xml:19: Cannot find javahl, svnkit nor command line svn clie
nt
Total time: 0 seconds
我看到了使用标记<svn svnkit="false" javahl="false">
运行它的建议,但后来我得到了这个输出:
C:\dev\svnant>C:\Programs\eclipse\plugins\org.apache.ant_1.8.2.v20120109-1030\bi
n\ant.bat
Buildfile: C:\dev\svnant\build.xml
[svn] Deprecated attribute 'svnkit'. This attribute will disappear with SV
NANT 1.3.2. Use svnSetting instead.
[svn] Deprecated attribute 'javahl'. This attribute will disappear with SV
NANT 1.3.2. Use svnSetting instead.
[svn] svn: The path 'C:\dev\workspace\rmsitpew\PEW\src' appears to be part
of a Subversion 1.7 or greater
[svn] working copy rooted at 'C:\dev\workspace\rmsitpew'.
[svn] Please upgrade your Subversion client to use this working copy.
[svn] <Info> failed.
BUILD FAILED
C:\dev\svnant\build.xml:18: Failed to set 'info' properties
以下是目录C:\ rms-it-apps \ ant \ taskdefs \ svnant-1.3.1 \ lib:
的内容04/05/2012 10:44 AM 3,010 GANYMED-LICENSE
04/05/2012 10:44 AM 244,831 ganymed.jar
04/05/2012 10:44 AM 2,800 JAVAHL-LICENSE
04/05/2012 10:44 AM 544 JNA-LICENSE
04/05/2012 10:44 AM 948,100 jna.jar
04/05/2012 10:44 AM 2,276 SEQUENCE-LICENSE
04/05/2012 10:44 AM 76,383 svnant.jar
04/05/2012 10:44 AM 11,935 SVNCLIENTADAPTER-LICENSE
04/05/2012 10:44 AM 215,757 svnClientAdapter.jar
04/05/2012 10:44 AM 89,412 svnjavahl.jar
04/05/2012 10:44 AM 2,695 SVNKit-LICENSE