You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by alan <al...@pacbell.net> on 2004/07/13 03:10:55 UTC

Dynamic compilation

Does anyone know if it's possible to have a central build file call out
dynamically to whatever slave build files it can find under it's directory.

Our project consists of many modules that are frequently added to.  Each has
it's own build file.  These all have the same targets and are all called
minibuild.xml.  

We then have a central build file that calls out to these slave files and
builds each of them.  

What I'd like to be able to do is avoid the need to edit the central file
when a new module is added to the project.  The default case would be the
developer would just put the standard minibuild.xml file in the root
directory of their module and the regular build process would pick it up and
run the relevant target (clean, build, etc.).

Does anyone know how this might be achieved.  If possible without resorting
to writing custom build files.

Grateful for any pointers...

alan







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


RE: Dynamic compilation

Posted by alan <al...@pacbell.net>.
Subant did look like it was going to do the trick.  However, my problem
became that the build file in the subdirectory was being run as if it were
in the higher directory so all my relative links were off.

Is there a way to make the build files called by subant recognize their own
directory as the base directory for relative references.

I tried setting the basedir property for the slave build file but that
didn't work (I thought it would).  InheritAll and inheritRefs don't appear
to do what I'd like them to either.

Am I on the right track?

alan



-----Original Message-----
From: Yuji Yamano [mailto:yyamano@kt.rim.or.jp] 
Sent: Monday, July 12, 2004 6:26 PM
To: user@ant.apache.org; alanbrown@pacbell.net
Subject: Re: Dynamic compilation

On Mon, 12 Jul 2004 18:10:55 -0700,
"alan" <al...@pacbell.net> wrote:

> Does anyone know if it's possible to have a central build file call out
> dynamically to whatever slave build files it can find under it's
directory.
> 
> Our project consists of many modules that are frequently added to.  Each
has
> it's own build file.  These all have the same targets and are all called
> minibuild.xml.  
>
> We then have a central build file that calls out to these slave files and
> builds each of them.  

Subant task seems to fit your needs.

http://ant.apache.org/manual/CoreTasks/subant.html

-- Yuji Yamano <yy...@kt.rim.or.jp>
  Loan me your funky mind. So I can play with it,
  for nothing is good unless you play with it. --George Clinton

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




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


Re: Dynamic compilation

Posted by Yuji Yamano <yy...@kt.rim.or.jp>.
On Mon, 12 Jul 2004 18:10:55 -0700,
"alan" <al...@pacbell.net> wrote:

> Does anyone know if it's possible to have a central build file call out
> dynamically to whatever slave build files it can find under it's directory.
> 
> Our project consists of many modules that are frequently added to.  Each has
> it's own build file.  These all have the same targets and are all called
> minibuild.xml.  
>
> We then have a central build file that calls out to these slave files and
> builds each of them.  

Subant task seems to fit your needs.

http://ant.apache.org/manual/CoreTasks/subant.html

-- Yuji Yamano <yy...@kt.rim.or.jp>
  Loan me your funky mind. So I can play with it,
  for nothing is good unless you play with it. --George Clinton

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