Java Mailing List Archive

http://www.ant-tasks.com/

Home » Ant Users List »

Import task defined in other build file?

Andrew n marshall

2008-03-05

Replies:

Author LoginPost Reply

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@(protected)
For additional commands, e-mail: user-help@(protected)

©2008 ant-tasks.com - Jax Systems, LLC, U.S.A.