[Issue 1722] New - Infinite maven2 build loop

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[Issue 1722] New - Infinite maven2 build loop

syvalta-2
https://hudson.dev.java.net/issues/show_bug.cgi?id=1722
                 Issue #|1722
                 Summary|Infinite maven2 build loop
               Component|hudson
                 Version|current
                Platform|All
              OS/Version|All
                     URL|
                  Status|NEW
       Status whiteboard|
                Keywords|
              Resolution|
              Issue type|DEFECT
                Priority|P2
            Subcomponent|maven2
             Assigned to|issues@hudson
             Reported by|syvalta






------- Additional comments from [hidden email] Tue May 20 05:59:53 +0000 2008 -------
I have the following maven2 project hierarchy:

|--> A <--|
|         |
|         |
B <------ C

So there is no circular dependency. This works nicely unless, C is a module of
A, i.e.:
a/pom.xml
a/c/pom.xml
b/pom.xml

and A lists C as module.

In Hudson, project A has B listed as both upstream and downstrean dependency,
which results in an infinite build loop. However, I think this is a legal setup
in Maven2, as there is no circular dependency. I haven't investigated this
thoroughly, but it might be that modules are considered downstream projects even
they aren't.

I'll attach a test project demonstrating the bug. Just adding A and B to Hudson
should cause the loop. If not, committing something should do it.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Issue 1722] Infinite maven2 build loop

syvalta-2
https://hudson.dev.java.net/issues/show_bug.cgi?id=1722






------- Additional comments from [hidden email] Tue May 20 06:03:27 +0000 2008 -------
Created an attachment (id=261)
Example project demonstrating the bug


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Issue 1722] Detect a cycle in Maven project and report it

Kohsuke Kawaguchi
Administrator
In reply to this post by syvalta-2
https://hudson.dev.java.net/issues/show_bug.cgi?id=1722



User kohsuke changed the following:

                What    |Old value                 |New value
================================================================================
                  Status|NEW                       |STARTED
--------------------------------------------------------------------------------
              Issue type|DEFECT                    |ENHANCEMENT
--------------------------------------------------------------------------------
                 Summary|Infinite maven2 build loop|Detect a cycle in Maven pr
                        |                          |oject and report it
--------------------------------------------------------------------------------




------- Additional comments from [hidden email] Thu May 22 16:06:33 +0000 2008 -------
There is indeed a cycle in your build, not at a module level, but at a reactor
level.

You organized your build into two Maven reactor executions, one that just builds
B and the other that builds A and C. B depends on A+C since B depends on A, and
A+C depends on B because C depends on B.

While Maven doesn't detect this as an error, this is nontheless a problematic
dependency set up. Imagine, for example, running maven release plugin on these
modules, and I hope you'll see why this is not a Hudson problem.


In the mean time, there's an RFE filed as #1714 which should help you with this
situation. The remaining issue is for Hudson to be able to diagnose the cycle
problem, so I'm updating this issue accordingly.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]