ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew n marshall <>
Subject Re: taskdef question - only usable at project level?
Date Wed, 12 Mar 2008 13:15:23 GMT

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">
      <checkout url="${cpptasks.svn}" destPath="${cpptasks.dir}" />

  <target name="define_svnant_tasks">
    <!-- Using ant-contrib's antfetch task to call targets and import resulting classpath
    <taskdef resource="net/sf/antcontrib/"/>
    <antfetch antfile="svnant.xml" target="define_svnant_classpath" return="svnant.classpath"/>
    <taskdef resource="">
        <pathelement path="${svnant.classpath}" />
    <echo>Defined &lt;svn&gt; task</echo>

I currently get the following error:
> define_svnant_classpath:
>      [echo] Defined <svn> task
> update:
> /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.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message