Andrew:

Namespace isn't really an issue...I just like using it ;) I think it makes it clearer where things originate...

Anyway...

I did figure out a way to do what I had intended. I am actually able to download Ant contrib dynamically, install it and then use it... If you are interested in my solution, I'd be happy to share that with you...



Andrew n marshall wrote:

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 &lt;svn&gt; 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]



--
Scot P. Floess
27 Lake Royale
Louisburg, NC  27549

252-478-8087 (Home)
919-754-4592 (Work)

Chief Architect JPlate   http://sourceforge.net/projects/jplate
Chief Architect JavaPIM  http://sourceforge.net/projects/javapim

Architect Keros          http://sourceforge.net/projects/keros


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to