I'm knew to ANT and still in the process of trying to get up to speed on
everything, including still reading through _Java Development With Ant_.

I have come into a job with an existing build infrastructure.  Normal
builds are all ant, but the automated build stuff is a combination of shell
scripts and ant.  I am trying to migrate all of the functions that shell
script provides into the build file for a couple of reasons.  First,
practice.  Second, being able to easily migrate build system back and forth
between our Linux and Win32 boxes (this builds will eventually incorporate
running the test suite automatically, and I'll probably bounce back and
forth between environments until I get stuff in place to run them both).

The project currently has the following layout:

/lib1/.../build.xml
/lib2/.../build.xml
...
/libN/.../build.xml
/project/.../build.xml
/pseudoprojectbuilddriver/.../build.xml

Now, all of the libraries are intended to be maintained independently for
possible use in other applications, but currently nothing else uses them.
Additionally, as the main project needs new features added, new features
must be added to various libraries in parallel.  So, while it annoys the
hell out of me, no one else is interested in turning all of the libraries
into individually released components.

At least the main project build file doesn't directly interface with all of
the library xml files.  Instead we have a pseudo project that calls each of
the other build files with <antfile/> in the appropriate order.

Now, the problem with <antfile/>, at least as far as I have been able to
read in the docs and ant-user archives, is that there is no
failonerror="no" equivalent.  Nor do I see a general way to catch failures.
So, if a file fails to compile, the automated build exits, and I can't send
off an email from inside ant to the appropriate individuals telling them
they need to buy the next round.

So, is changing <antfile/> to <exec ant/> my only option?  For automated
builds, we have some logger stuff set up to save all of the output, but
that doesn't happen for regular builds.  So that may be a little tricky
(then again, it may all ``just work'', haven't yet looked at anything down
that route yet).

Or I may just invoke myself with exec with the standard build target, and
not have to worry about changing all of the <antfile/> tasks.

What would my other options be?  What sort of gotchas are there to look for
in replacing <antfile/> with <exec ant/>?  Are there any very near term
plans for offering up failonerror type of handling for <antfile/>?  I'd
seen some references for plans, mostly related to ant2, but there's so much
noise showing up when I do searches that it might be getting lost.

Any comments, ideas, useful search terms appreciated.

mrc
-- 
     Mike Castle      [EMAIL PROTECTED]      www.netcom.com/~dalgoda/
    We are all of us living in the shadow of Manhattan.  -- Watchmen
fatal ("You are in a maze of twisty compiler features, all different"); -- gcc

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to