You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Torsten Schlabach <TS...@gmx.net> on 2007/09/05 16:57:23 UTC

Reactor and cyclic dependencies with different scopes

Hi!

I have a number of projects in my reactor.

- Project A requires project B with <scope>compile</scope>
- Project B requires project A with <scope>test</scope>

So this is not really the classical cyclic dependency. Nevertheless, I get

[INFO] The projects in the reactor contain a cyclic reference: Edge between 'Vertex{label='xxx'}' and 'Vertex{label='yyy'}' introduces to cycle in the graph ...

My question: Is that by design? Or does the reactor just not pay attention to the scopes? Should it? In case of the latter, I guess I should create a JIRA entry for that?

Regards,
Torsten

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


Re: Reactor and cyclic dependencies with different scopes

Posted by Tim Kettler <ti...@udo.edu>.
Hi,

the graph is calculated based on the projects building the artifacts, 
not the artifacts themself. The artifatcs don't appear out of thin air 
;), to build them the project they belong to must execute.

In your case: To make B, A:test must be available. So A must execute 
before B... but wait A dependens on B:compile, so B must execute before 
A ...bang.

-Tim

Torsten Schlabach schrieb:
> Hi!
> 
> I have a number of projects in my reactor.
> 
> - Project A requires project B with <scope>compile</scope>
> - Project B requires project A with <scope>test</scope>
> 
> So this is not really the classical cyclic dependency. Nevertheless, I get
> 
> [INFO] The projects in the reactor contain a cyclic reference: Edge between 'Vertex{label='xxx'}' and 'Vertex{label='yyy'}' introduces to cycle in the graph ...
> 
> My question: Is that by design? Or does the reactor just not pay attention to the scopes? Should it? In case of the latter, I guess I should create a JIRA entry for that?
> 
> Regards,
> Torsten
> 
> ---------------------------------------------------------------------
> 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: Reactor and cyclic dependencies with different scopes

Posted by Wayne Fay <wa...@gmail.com>.
I think you probably want to look into creating a "test-jar" and
adding a dependency on that in both projects.

Wayne

On 9/5/07, Torsten Schlabach <TS...@gmx.net> wrote:
> Hi!
>
> I have a number of projects in my reactor.
>
> - Project A requires project B with <scope>compile</scope>
> - Project B requires project A with <scope>test</scope>
>
> So this is not really the classical cyclic dependency. Nevertheless, I get
>
> [INFO] The projects in the reactor contain a cyclic reference: Edge between
> 'Vertex{label='xxx'}' and 'Vertex{label='yyy'}' introduces to cycle in the
> graph ...
>
> My question: Is that by design? Or does the reactor just not pay attention
> to the scopes? Should it? In case of the latter, I guess I should create a
> JIRA entry for that?
>
> Regards,
> Torsten
>
> ---------------------------------------------------------------------
> 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