ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew n marshall <Andrew.n.marsh...@mail.com>
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 -->
  <svn>
    <checkout url="${cpptasks.svn}" destPath="${cpptasks.dir}" />
  </svn>

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?


Anm

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message