"Kyle Adams" wrote:

> For example, our user management app may only have the back-end
implemented.  
> So the directory for the app would have only one subdirectory.  On the
other 
> hand, our customer management app may have the front-end and the back-end 
> implemented, so the directory would contain two directories.
>
> These subdirectories use standard names, so that's not a problem, and
there 
> will always be between 1 and 3.  It's just a matter of how many.
>
> Is it reasonable to ask Ant to do this?  Or should I be looking at another
tool > (say, a Perl script) that then passes each subdirectory to Ant?

I think it's perfectly reasonable! I've had experience with creating
frameworks and stuff and also with building makefiles that dynamically
recurses down to any subdirectory that contains a proper makefile.

Experimenting a bit with Ant, I tried to do the same (with the Ant task)
but I couldn't make it work. Instead I created my own task, SubProject,
which will call Ant recursively on any number of build-files, specified
with a nested 'fileset' element.

For example,

  <target name="build" depends="init">
    <subproject target="build">
      <fileset dir="${basedir}">
        <patternset>
          <include name="*/build.xml" />
        </patternset>
      </fileset>
      <property name="foo" value="baz" />
     </subproject>
  </target>

I think it works really well and will post it to the ant-dev mailing list
as soon as I've cleaned up the code and finished the documentation.

In the meantime, if you're interrested, drop me a letter and I'll
send you the source right away!

/MiKe

Mikael Brandt
NOBLE(STAR AB
Kungsgatan 42, SE-111 35 Stockholm, Sweden
Tel +46 (0)8 412 55 00
Fax +46 (0)8 412 55 99
Mobile +46 (0)705 840475
[EMAIL PROTECTED]
http://www.noblestar.com



###########################################

This message has been scanned by F-Secure Anti-Virus for Microsoft Exchange.
For more information, connect to http://www.F-Secure.com/

Reply via email to