You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by weiji <na...@hotmail.com> on 2007/10/02 01:39:05 UTC

doing antcalls in parallel

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.  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.

Any suggestions are appreciated.

Thanks,
KaJun
-- 
View this message in context: http://www.nabble.com/doing-antcalls-in-parallel-tf4551983.html#a12990185
Sent from the Ant - Users mailing list archive at Nabble.com.


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


Re: doing antcalls in parallel

Posted by Steve Loughran <st...@apache.org>.
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: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


RE: doing antcalls in parallel

Posted by "Murray, Mike" <mb...@ptc.com>.
    <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"/>
	  <parallel>
           <antcall target="junit"/>
           <antcall target="javadoc"/>
           <antcall target="deploy"/>
	  </parallel>
    </target> 

-----Original Message-----
From: weiji [mailto:nabbleOp@hotmail.com] 
Sent: Monday, October 01, 2007 6:39 PM
To: user@ant.apache.org
Subject: doing antcalls in parallel


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.  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.

Any suggestions are appreciated.

Thanks,
KaJun
--
View this message in context:
http://www.nabble.com/doing-antcalls-in-parallel-tf4551983.html#a1299018
5
Sent from the Ant - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
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