You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-user@ant.apache.org by Magnus Grimsell <ma...@idainfront.se> on 2011/08/04 09:34:16 UTC

circular dependency not detected

Hi all,

I'm working on integrating Ivy into our existing ant based build system. I've only been working with this for a short period of time so I might have missed some important concept.
My problem now is that I have a module app that depends on mail which in turn depends on app. This is a circular dependency and I would like for Ivy to fail.

This is my Ivy files:
App:
<ivy-module version="2.0">
  <info organisation="${ivy.organisation}" module="app" revision="${version}"/>
  <dependencies>
    <dependency org="com.iipax" name="mail" rev="latest.integration" />
  </dependencies>
</ivy-module>

Mail:
<ivy-module version="2.0">
  <info organisation="${ivy.organisation}" module="mail" revision="${version}"/>
  <dependencies>
    <dependency org="com.iipax" name="app" rev="latest.integration" />
  </dependencies>
</ivy-module>

In my settings file I have circularDependencyStrategy set to error.
My expectation was when I build one of this modules I would get an error but everything works just fine.

[ivy:resolve] :: Ivy 2.2.0 - 20100923230623 :: http://ant.apache.org/ivy/ ::
[ivy:resolve] :: loading settings :: file = C:\code\cc\maggr_dev\ida\java\ivysettings.xml
[ivy:resolve] :: resolving dependencies :: com.iipax#mail;4.12M4-SNAPSHOT
[ivy:resolve]    confs: [default]
[ivy:resolve]    found com.iipax#app;4.12M4-SNAPSHOT in local
[ivy:resolve]    [4.12M4-SNAPSHOT] com.iipax#app;latest.integration
[ivy:resolve] downloading C:\Users\maggr\.ivy2\local-repo\com.iipax\app\app-4.12M4-SNAPSHOT.jar ...
[ivy:resolve] .. (2kB)
[ivy:resolve] .. (0kB)
[ivy:resolve]    [SUCCESSFUL ] com.iipax#app;4.12M4-SNAPSHOT!app.jar (77ms)
[ivy:resolve] :: resolution report :: resolve 3419ms :: artifacts dl 78ms
                             ---------------------------------------------------------------------
                             |                  |            modules            ||   artifacts   |
                             |       conf       | number| search|dwnlded|evicted|| number|dwnlded|
                             ---------------------------------------------------------------------
                             |      default     |   1   |   1   |   0   |   0   ||   1   |   1   |
                             ---------------------------------------------------------------------

What am I missing?

/Magnus


Re: circular dependency not detected

Posted by Archie Cobbs <ar...@dellroad.org>.
On Mon, Aug 8, 2011 at 3:40 AM, Magnus Grimsell <
magnus.grimsell@idainfront.se> wrote:

> I do have circularDependencyStrategy set to error in my ivy settings file.


Oops, I missed that line of your email...  now it makes more sense.


> Doesn't that mean that Ivy should fail the build when I resolve either one
> of the modules?
>

You would think so... now I agree with you that this is a bug if it doesn't
fail when the strategy is set to "error" :)

-Archie

-- 
Archie L. Cobbs

SV: circular dependency not detected

Posted by Magnus Grimsell <ma...@idainfront.se>.
Well thats a way to see it I guess :)
I do have circularDependencyStrategy set to error in my ivy settings file. Doesn't that mean that Ivy should fail the build when I resolve either one of the modules?

-----Ursprungligt meddelande-----
Från: archie.cobbs@gmail.com [mailto:archie.cobbs@gmail.com] För Archie Cobbs
Skickat: den 4 augusti 2011 15:52
Till: ivy-user@ant.apache.org
Ämne: Re: circular dependency not detected

Ha! I'd call that a feature, not a bug... :-)

On Thu, Aug 4, 2011 at 2:34 AM, Magnus Grimsell <
magnus.grimsell@idainfront.se> wrote:

> I'm working on integrating Ivy into our existing ant based build system.
> I've only been working with this for a short period of time so I might have
> missed some important concept.
> My problem now is that I have a module app that depends on mail which in
> turn depends on app. This is a circular dependency and I would like for Ivy
> to fail.
>

-- 
Archie L. Cobbs

Re: circular dependency not detected

Posted by Archie Cobbs <ar...@dellroad.org>.
Ha! I'd call that a feature, not a bug... :-)

On Thu, Aug 4, 2011 at 2:34 AM, Magnus Grimsell <
magnus.grimsell@idainfront.se> wrote:

> I'm working on integrating Ivy into our existing ant based build system.
> I've only been working with this for a short period of time so I might have
> missed some important concept.
> My problem now is that I have a module app that depends on mail which in
> turn depends on app. This is a circular dependency and I would like for Ivy
> to fail.
>

-- 
Archie L. Cobbs