I am also trying to develop something like what Scot described and
running into similar problems. However, I am not using the namespace
notation. My version looks something like this:
<target name="update" depends="define_svnant_tasks">
<svn>
<checkout url="${cpptasks.svn}" destPath="${cpptasks.dir}" />
</svn>
</target>
<target name="define_svnant_tasks">
<!-- Using ant-contrib's antfetch task to call targets and import resulting
classpath -->
<taskdef resource="net/sf/antcontrib/antcontrib.properties"/>
<antfetch antfile="svnant.xml" target="define_svnant_classpath"
return="svnant.classpath"/>
<taskdef resource="svntask.properties">
<classpath>
<pathelement path="${svnant.classpath}" />
</classpath>
</taskdef>
<echo>Defined <svn> task</echo>
</target>
I currently get the following error:
define_svnant_classpath:
[echo] Defined <svn> task
update:
BUILD FAILED
/Users/Anm/Projects/Development/ant_cpp_skeleton/lib/cpptasks.xml:19:
java.lang.NoClassDefFoundError:
org/tigris/subversion/javahl/ClientException
Matt Benson wrote:
In Ant's distro (I think, else in SVN HEAD) you can check out the
cooperation between fetch.xml and get-m2.xml . This does something
like what you're talking about.
The main difference I see is the use of import. Instead, I avoid the
polluting the namespace by just <antfetch>ing the classpath before
defining the task. Still, the task definition is missing in the
depending target.
Anm
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]