Reputation: 161
I'm trying to update my codebase using ant. I have placed svnant.jar, svnClientAdapter.jar, svnjavahl.jar under ANT_HOME\lib directory. I'm using the bellow code snippet and it gives error.
Problem: failed to create task or type svnSetting
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any <presetdef>
/<macrodef>
declarations have taken place.
<path id= "svnant.classpath" >
<fileset dir= "${antlib.dir}" >
<include name= "*.jar" />
</fileset>
</path>
<typedef resource="org/tigris/subversion/svnant/svnantlib.xml" classpathref="svnant.classpath" />
<target name="init-svn">
<svnSetting svnkit="false" javahl="true" username="***" password="****" id="svn.settings" />
</target>
<target name="update-source" depends="init-svn">
<svn refid="svn.settings" >
<update dir="${basedir}" revision="HEAD" url="${svn.url}"/>
</svn>
</target>
can someone help me please?
Upvotes: 3
Views: 5938
Reputation: 2013
I guess you didn't defined the property antlib.dir
anywhere. So here you build an empty classpath for the taskdef
.
Actually if you put your jars into ANT_HOME\lib, you don't need to build a classpath for your taskdef
. Just do:
<typedef resource="org/tigris/subversion/svnant/svnantlib.xml" />
And to be sure Ant see your jars correctly, just run ant -diagnostics
Upvotes: 2