Maven 1

"A cycle was detected" where no cycle can be found

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Cannot Reproduce
  • Affects Version/s: 1.1-beta-2
  • Fix Version/s: 1.1-beta-3
  • Component/s: None
  • Labels:
    None
  • Environment:
    SUSE Linux 10.0 (kernel 2.6.13-15-smp), J2SDK 1.4.2_10
  • Number of attachments :
    4

Description

I have a quite large multiproject project which I fail to build using Maven 1.1beta2 (Maven 1.0.2 works fine). I "divided and conquered" a bit and excluded all but the most basic project, then added one at a time. When I included my third project, the build fails with the message "A cycle was detected". The dependencies for these tree projects (except external dependencies) are:

Project 1 depends on Project 2 and Project 3. Project 2 depends on Project 3.

Project 3 is a base "project" which contains common services and are used by all other projects.

I'll attach the dependencies part of the three subprojects.

When I run the same goal (any multiproject goal, for example 'maven -Dgoal=clean multiproject:goal') using Maven 1.0.2 it works fine:
Starting the reactor...
Our processing order:
webSelect Project 3
webSelect Project 2
webSelect Project 1

When I tried commenting out all dependencies apart from the project mentioned above, it still fails, it even fails when I remove Project 1's dependency to Project 3.

What is even more confusing is when I replace Project 1 with another subproject which have the same dependencies it works fine (which however, is a ejb project instead of being a jar project which Project 1 is).

  1. proj1_dependencies.xml
    13/Mar/06 3:24 AM
    1 kB
    Anders Heintz
  2. proj2_dependencies.xml
    13/Mar/06 3:24 AM
    2 kB
    Anders Heintz
  3. proj3_dependencies.xml
    13/Mar/06 3:24 AM
    2 kB
    Anders Heintz

Activity

Hide
Arnaud Heritier added a comment -

It's certainly related to MAVEN-1750.
We have several problems with multiprojects : MAVEN-1741, MAVEN-1710, MAVEN-1691, ...
It's on the top of my todo list

Show
Arnaud Heritier added a comment - It's certainly related to MAVEN-1750. We have several problems with multiprojects : MAVEN-1741, MAVEN-1710, MAVEN-1691, ... It's on the top of my todo list
Hide
Anders Heintz added a comment -

Thanks for your information, let me know if I can be of any help with testing etc.

Show
Anders Heintz added a comment - Thanks for your information, let me know if I can be of any help with testing etc.
Hide
Arnaud Heritier added a comment -

Thanks, I'll deploy a snapshot to allow you to test it ASAP.

Show
Arnaud Heritier added a comment - Thanks, I'll deploy a snapshot to allow you to test it ASAP.
Hide
David Jencks added a comment -

I don't know if it is related to this exact problem, but I have noticed that if I accidentally have 2 subprojects with the same name, maven claims there is a cycle. Changing the name of one project allows the build to proceed.

Show
David Jencks added a comment - I don't know if it is related to this exact problem, but I have noticed that if I accidentally have 2 subprojects with the same name, maven claims there is a cycle. Changing the name of one project allows the build to proceed.
Hide
Lukas Theussl added a comment -

Attached a simple test project for the scenario you describe. I cannot reproduce the bug (neither with m1.1-beta-2), please check.

Show
Lukas Theussl added a comment - Attached a simple test project for the scenario you describe. I cannot reproduce the bug (neither with m1.1-beta-2), please check.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: