You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Jefferson K. French" <je...@frenches.org> on 2004/01/29 21:56:41 UTC

ant:parallel is working differently in Maven than in Ant

I'm running the exact same set of tags with Ant and Maven, but I get
different behavior. The Maven I'm using was built from CVS on
11/25/03. I put this:

    <parallel>
      <sequential>
        <echo>Thread one sleeping for three seconds</echo>
        <sleep seconds="3"/>
        <echo>Thread one done sleeping</echo>
      </sequential>
      <sequential>
        <echo>Thread two sleeping for one second</echo>
        <sleep seconds="1"/>
        <echo>Thread two done sleeping</echo>
      </sequential>
    </parallel>
    <echo>All threads complete</echo>

in both a build.xml and maven.xml. Running ant on the target gives:

anttest:
     [echo] Thread one sleeping for three seconds
     [echo] Thread two sleeping for one second
     [echo] Thread two done sleeping
     [echo] Thread one done sleeping
     [echo] All threads complete

as I expected. Running Maven on the goal gives:

anttest:
    [echo] Thread one sleeping for three seconds
    [echo] Thread one done sleeping
    [echo] Thread two sleeping for one second
    [echo] Thread two done sleeping
    [echo] All threads complete

The two tasks run sequentially, even though they should run in the
parallel. Running maven -X just gives a couple messages about adding
classpath references and verbose output on the sleep tag. Adding the
"ant" namespace to all the Ant tags results in the same behavior.

Has anyone else seen this? Is there something else I should or should
not be doing to get the tasks to run in parallel in Maven?

    Jeff

-- 
mailto:jeff@frenches.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: ant:parallel is working differently in Maven than in Ant

Posted by Emmanuel Venisse <em...@venisse.net>.
Ant tags are processing by jelly that is embedded in Maven.
I think it's a jelly bug and not a Maven bug.

Emmanuel

----- Original Message ----- 
From: "Jefferson K. French" <je...@frenches.org>
To: "Maven" <us...@maven.apache.org>
Sent: Thursday, January 29, 2004 9:56 PM
Subject: ant:parallel is working differently in Maven than in Ant


> I'm running the exact same set of tags with Ant and Maven, but I get
> different behavior. The Maven I'm using was built from CVS on
> 11/25/03. I put this:
> 
>     <parallel>
>       <sequential>
>         <echo>Thread one sleeping for three seconds</echo>
>         <sleep seconds="3"/>
>         <echo>Thread one done sleeping</echo>
>       </sequential>
>       <sequential>
>         <echo>Thread two sleeping for one second</echo>
>         <sleep seconds="1"/>
>         <echo>Thread two done sleeping</echo>
>       </sequential>
>     </parallel>
>     <echo>All threads complete</echo>
> 
> in both a build.xml and maven.xml. Running ant on the target gives:
> 
> anttest:
>      [echo] Thread one sleeping for three seconds
>      [echo] Thread two sleeping for one second
>      [echo] Thread two done sleeping
>      [echo] Thread one done sleeping
>      [echo] All threads complete
> 
> as I expected. Running Maven on the goal gives:
> 
> anttest:
>     [echo] Thread one sleeping for three seconds
>     [echo] Thread one done sleeping
>     [echo] Thread two sleeping for one second
>     [echo] Thread two done sleeping
>     [echo] All threads complete
> 
> The two tasks run sequentially, even though they should run in the
> parallel. Running maven -X just gives a couple messages about adding
> classpath references and verbose output on the sleep tag. Adding the
> "ant" namespace to all the Ant tags results in the same behavior.
> 
> Has anyone else seen this? Is there something else I should or should
> not be doing to get the tasks to run in parallel in Maven?
> 
>     Jeff
> 
> -- 
> mailto:jeff@frenches.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: parallel is working differently in Maven than in Ant

Posted by "Jefferson K. French" <je...@frenches.org>.
Yes, but this example is just scaled down from where I first noticed
it. Originally instead of the simple sleeps and echos, I ran a message
feeder program that took 30-40 minutes to run. It was much more
obvious with that example that the programs ran sequentially. I just
created the simplified example for the post

On Thu, 29 Jan 2004, at 13:14:04 [GMT -0800] W. Sean Hennessy wrote:

> Can you timestamp each of the thread echo output to exclude the possibility the
> output stream is representing order incorrectly?


> -----Original Message-----
> From: Jefferson K. French [mailto:jeff@frenches.org] 
> Sent: Thursday, January 29, 2004 12:57 PM
> To: Maven
> Subject: ant:parallel is working differently in Maven than in Ant


> I'm running the exact same set of tags with Ant and Maven, but I get different behavior. The Maven I'm using was built
> from CVS on 11/25/03. I put this:

>     <parallel>
>       <sequential>
>         <echo>Thread one sleeping for three seconds</echo>
>         <sleep seconds="3"/>
>         <echo>Thread one done sleeping</echo>
>       </sequential>
>       <sequential>
>         <echo>Thread two sleeping for one second</echo>
>         <sleep seconds="1"/>
>         <echo>Thread two done sleeping</echo>
>       </sequential>
>     </parallel>
>     <echo>All threads complete</echo>

> in both a build.xml and maven.xml. Running ant on the target gives:

> anttest:
>      [echo] Thread one sleeping for three seconds
>      [echo] Thread two sleeping for one second
>      [echo] Thread two done sleeping
>      [echo] Thread one done sleeping
>      [echo] All threads complete

> as I expected. Running Maven on the goal gives:

> anttest:
>     [echo] Thread one sleeping for three seconds
>     [echo] Thread one done sleeping
>     [echo] Thread two sleeping for one second
>     [echo] Thread two done sleeping
>     [echo] All threads complete

> The two tasks run sequentially, even though they should run in the parallel. Running maven -X just gives a couple
> messages about adding classpath references and verbose output on the sleep tag. Adding the "ant" namespace to all the
> Ant tags results in the same behavior.

> Has anyone else seen this? Is there something else I should or should not be doing to get the tasks to run in parallel
> in Maven?

>     Jeff


-- 
mailto:jeff@frenches.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: parallel is working differently in Maven than in Ant

Posted by "W. Sean Hennessy" <sh...@goldenhourdata.com>.
Can you timestamp each of the thread echo output to exclude the possibility the
output stream is representing order incorrectly?


-----Original Message-----
From: Jefferson K. French [mailto:jeff@frenches.org] 
Sent: Thursday, January 29, 2004 12:57 PM
To: Maven
Subject: ant:parallel is working differently in Maven than in Ant


I'm running the exact same set of tags with Ant and Maven, but I get different behavior. The Maven I'm using was built
from CVS on 11/25/03. I put this:

    <parallel>
      <sequential>
        <echo>Thread one sleeping for three seconds</echo>
        <sleep seconds="3"/>
        <echo>Thread one done sleeping</echo>
      </sequential>
      <sequential>
        <echo>Thread two sleeping for one second</echo>
        <sleep seconds="1"/>
        <echo>Thread two done sleeping</echo>
      </sequential>
    </parallel>
    <echo>All threads complete</echo>

in both a build.xml and maven.xml. Running ant on the target gives:

anttest:
     [echo] Thread one sleeping for three seconds
     [echo] Thread two sleeping for one second
     [echo] Thread two done sleeping
     [echo] Thread one done sleeping
     [echo] All threads complete

as I expected. Running Maven on the goal gives:

anttest:
    [echo] Thread one sleeping for three seconds
    [echo] Thread one done sleeping
    [echo] Thread two sleeping for one second
    [echo] Thread two done sleeping
    [echo] All threads complete

The two tasks run sequentially, even though they should run in the parallel. Running maven -X just gives a couple
messages about adding classpath references and verbose output on the sleep tag. Adding the "ant" namespace to all the
Ant tags results in the same behavior.

Has anyone else seen this? Is there something else I should or should not be doing to get the tasks to run in parallel
in Maven?

    Jeff

-- 
mailto:jeff@frenches.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org