weiji wrote:
Hi,
I have a few targets set up related to handling Java code. After the code
is compiled, I run JUnit tests and generate Javadocs. Kudos to "Ant in
Action" with the very handy junitreport setup.
youre welcome :)
My question is whether it
would be possible to run the targets in parallel, since I have a few targets
that don't depend on each other and can take a large amount of time.
My target looks like this: (the test cases are compiled separately, for now)
<target name="allJ" description="Do full build of java sources, docs and
testing">
<antcall target="-init"/>
<antcall target="clean"/>
<antcall target="javac"/>
<antcall target="javac-tests"/>
<antcall target="junit"/>
<antcall target="javadoc"/>
<antcall target="deploy"/>
</target>
We are doing daily interim builds on an early alpha webapp and don't expect
all tests to pass. Thus the "deploy" target can occur after "javac", and it
involves zipping up a large war file and transferring it to a staging
server. We'd like to have this occur in parallel with the unit testing and
javadoc generation.
Ant doesnt really like doing stuff in parallel. What I would recommend
is something different. Set up a continuous integration server that lets
you have multiple builds that can depend on each other, then have
different builds doing things in parallel.
so you have the following builds
-compile, package, publish using ivy
-run unit tests
-create javadocs and other documentation (forrest, open office PDF
exports, etc)
-functional tests by copying to a staging machine and testing there.
The CI server manages the dependencies between these big targets, and
can run them in parallel. More importantly, it can handle failure
better. If the tests fail, you still get the javadocs, and (if you want
it) the deployment to the staging site
-steve
Any suggestions are appreciated.
Thanks,
KaJun
--
Steve Loughran http://www.1060.org/blogxter/publish/5
Author: Ant in Action http://antbook.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]