ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew n marshall <>
Subject Import task defined in other build file?
Date Wed, 05 Mar 2008 13:46:15 GMT

Is it possible to define a task in one ant build file, but use it in 
another?  For example, I want to have a single build file that contains 
the properties and tasks to download a copy of svnant and define its 
tasks.  Then I want to call that ant file's define_svn_task target from 
another file (which works) and call an <svn ../> task, like this:

  <ant antfile="svnant.xml" target="define_svn_task"/><!-- which calls taskdef -->
    <checkout url="${cpptasks.svn}" destPath="${cpptasks.dir}" />

Thus, I can copy this svnant.xml to several projects and repositories 
without having to edit out project specific details or dig for svnant 
attributes like the download URL or install directory.

When I tried this, the define_svn_task target succeeded, but it "failed 
to create task or type svn" in the next line.

Can someone provide an example of how to do this properly?


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

View raw message