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 oakridge <ce...@yahoo.com> on 2008/05/15 23:06:29 UTC

Global and Local Excludes Being Ignored By Ivy [Config Prblm of Bug?]

Hi all, 

My project depends on a given version of Hibernate, but also has other
dependencies that rely on different versions of Hibernate.  The problem I am
experiencing is that the global excludes I have in place are not being
respected.  For example, I am attempting to exclude the CGLIB library (a
dependency of Hibernate), but it is always downloaded.  I found that if I
remove the dependencies which rely on Hibernate, the problem goes away.  It
seems as if Ivy is merging all the configurations/versions for the various
Hibernate files, and then resolving them.  I understand that this an
expected Ivy behavior from reading this message:

  
http://www.nabble.com/Conflicting-module-configurations-td14408110.html#a14420283

...but I believe the global and local exclude should still be respected
across the "merged" Hibernate config.  Is there way to ensure that other
dependencies don't interfere with my need to remove CGLIB without using the
transitive="false" statement and explicitly mapping Hibernates artifacts? Or
is this a bug?

Thanks,
Julian
-- 
View this message in context: http://www.nabble.com/Global-and-Local-Excludes-Being-Ignored-By-Ivy--Config-Prblm-of-Bug---tp17262577p17262577.html
Sent from the ivy-user mailing list archive at Nabble.com.


Re: Global and Local Excludes Being Ignored By Ivy [Config Prblm of Bug?] [Was Re: latest build of IvyDE from www.hibnet.org not picking up changes]

Posted by oakridge <ce...@yahoo.com>.
Sorry, I meant the bug report was filed for the original, non-threadjacked
issue.

Thanks.


oakridge wrote:
> 
> Bug report filed :
> 
> https://issues.apache.org/jira/browse/IVY-820
> 

-- 
View this message in context: http://www.nabble.com/Global-and-Local-Excludes-Being-Ignored-By-Ivy--Config-Prblm-of-Bug---tp17262577p17411312.html
Sent from the ivy-user mailing list archive at Nabble.com.


Re: latest build of IvyDE from www.hibnet.org not picking up changes

Posted by oakridge <ce...@yahoo.com>.
Bug report filed:

https://issues.apache.org/jira/browse/IVY-820
-- 
View this message in context: http://www.nabble.com/Global-and-Local-Excludes-Being-Ignored-By-Ivy--Config-Prblm-of-Bug---tp17262577p17411265.html
Sent from the ivy-user mailing list archive at Nabble.com.


Re: latest build of IvyDE from www.hibnet.org not picking up changes

Posted by Nicolas Lalevée <ni...@joost.com>.
Le lundi 19 mai 2008, Clements Mark a écrit :
> Hi,
>
> I have been using the unofficial builds (yes - caveat emptor, I know :)
> ) from www.hibnet.org for a month or two, with pretty good results. The
> latest build (May 16) isn't working too well for me. An initial resolve
> works fine, but modifying ivy.xml and resolving again has no effect.
>
> I create a new project TestIvyProject and create an ivy.xml file
>
> <?xml version="1.0"?>
> <?xml-stylesheet type="text/xsl"
>                     href="http://hercule/external/ivy/ivy-doc.xsl"?>
> <ivy-module version="1.3"
>     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>     xsi:noNamespaceSchemaLocation="http://hercule/ivy/ivy.xsd">
>     <info organisation="ofac" module="TestIvyProject" revision="CURRENT"
> />
>     <configurations>
>     <conf name="compile" description="compile-time" transitive="true"
>         visibility="public" />
>     <conf name="run"
>         description="run-time"
>         transitive="false" visibility="public" />
>     </configurations>
>     <dependencies>
>         <dependency org="easymock" name="easymock" rev="2.3" />
>     </dependencies>
>     <conflicts>
>         <manager name="ofac-cm" org="ofac" />
>         <manager name="latest-revision" org="(?!ofac).*" />
>     </conflicts>
> </ivy-module>
>
> (sorry about the wrapping).
>
> This resolves fine from my repository, and easymock.jar appears in the
> ivy.xml container.
>
> Now, if I add
>
>   <dependency org="apache" name="commons-lang" rev="latest.release" />
>
> To <dependencies> and resolve again, the new dependency is not resolved,
> and is not even mentioned in the ivy log. If I rollback the IvyDE plugin
> to the 3 April build, the behaviour is as expected.
>
> I'd be grateful for any help with this.

It is probably a bug. Could you open a Jira ?
https://issues.apache.org/jira/browse/IVYDE

cheers,
Nicolas


latest build of IvyDE from www.hibnet.org not picking up changes

Posted by Clements Mark <cl...@OFAC.CH>.
Hi,

I have been using the unofficial builds (yes - caveat emptor, I know :)
) from www.hibnet.org for a month or two, with pretty good results. The
latest build (May 16) isn't working too well for me. An initial resolve
works fine, but modifying ivy.xml and resolving again has no effect.

I create a new project TestIvyProject and create an ivy.xml file

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" 
                    href="http://hercule/external/ivy/ivy-doc.xsl"?>
<ivy-module version="1.3" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="http://hercule/ivy/ivy.xsd">
    <info organisation="ofac" module="TestIvyProject" revision="CURRENT"
/>
    <configurations>
    <conf name="compile" description="compile-time" transitive="true"
        visibility="public" />
    <conf name="run"
        description="run-time"
        transitive="false" visibility="public" />
    </configurations>
    <dependencies>
        <dependency org="easymock" name="easymock" rev="2.3" />
    </dependencies>
    <conflicts>
        <manager name="ofac-cm" org="ofac" />
        <manager name="latest-revision" org="(?!ofac).*" />
    </conflicts>
</ivy-module>

(sorry about the wrapping).

This resolves fine from my repository, and easymock.jar appears in the
ivy.xml container.

Now, if I add

  <dependency org="apache" name="commons-lang" rev="latest.release" />

To <dependencies> and resolve again, the new dependency is not resolved,
and is not even mentioned in the ivy log. If I rollback the IvyDE plugin
to the 3 April build, the behaviour is as expected.

I'd be grateful for any help with this.

Regards,

Mark

Re: Global and Local Excludes Being Ignored By Ivy [Config Prblm of Bug?]

Posted by Xavier Hanin <xa...@gmail.com>.
On Fri, May 16, 2008 at 3:40 PM, oakridge <ce...@yahoo.com> wrote:

>
> Hi all,
>
> **Please read below and let me know if I need to file a bug report.**

Yes you can. Global exclude of a whole module should work as local exclude.

 Xavier

>
>
> The Two Second Overview:
> =======================
> When declaring a global exclude, the exclude only applies to immediate
> dependencies, and not transitive dependencies.  This is distinct from local
> excludes, which appear to respect exclude statements throughout the entire
> dependency's transitive dependency graph.
>
>
> The Two Minute Overview:
> =======================
> Let's say we have dependencies on Modules A (rev 1) and B (rev 3).  Module
> A
> has a dependency on Module C.  Module B has a dependency on Module A (rev
> 2), which in turn has a dependency on Module C as well.
>
> A (rev 1) -> C
> B -> A (rev 2) -> C
>
> So if one places a global exclude for Module C, it isn't respected by
> Module
> B.  This seems to be because Module B retrieves module A, which retrieves
> Module C.  The transitive dependency on Module C avoids exclusion.  The
> only
> solution is to declare an exclusion explicitly for Module A and Module B,
> even though Module B has no direct dependency on Module C.  This can get
> hairy if many projects reference Module C through a transitive dependency
> of
> their own (like mine with Hibernate and CGLIB).
>
> Conclusion
> ==================
> Unless I am missing something, the global excludes should behave much the
> same a local excludes and affect the exlcusion of transitive depedencies.
> --
> View this message in context:
> http://www.nabble.com/Global-and-Local-Excludes-Being-Ignored-By-Ivy--Config-Prblm-of-Bug---tp17262577p17274992.html
> Sent from the ivy-user mailing list archive at Nabble.com.
>
>


-- 
Xavier Hanin - Independent Java Consultant
http://xhab.blogspot.com/
http://ant.apache.org/ivy/
http://www.xoocode.org/

Re: Global and Local Excludes Being Ignored By Ivy [Config Prblm of Bug?]

Posted by oakridge <ce...@yahoo.com>.
Hi all,

**Please read below and let me know if I need to file a bug report.**

The Two Second Overview:
=======================
When declaring a global exclude, the exclude only applies to immediate
dependencies, and not transitive dependencies.  This is distinct from local
excludes, which appear to respect exclude statements throughout the entire
dependency's transitive dependency graph.


The Two Minute Overview:
=======================
Let's say we have dependencies on Modules A (rev 1) and B (rev 3).  Module A
has a dependency on Module C.  Module B has a dependency on Module A (rev
2), which in turn has a dependency on Module C as well.

A (rev 1) -> C
B -> A (rev 2) -> C

So if one places a global exclude for Module C, it isn't respected by Module
B.  This seems to be because Module B retrieves module A, which retrieves
Module C.  The transitive dependency on Module C avoids exclusion.  The only
solution is to declare an exclusion explicitly for Module A and Module B,
even though Module B has no direct dependency on Module C.  This can get
hairy if many projects reference Module C through a transitive dependency of
their own (like mine with Hibernate and CGLIB).

Conclusion
==================
Unless I am missing something, the global excludes should behave much the
same a local excludes and affect the exlcusion of transitive depedencies.
-- 
View this message in context: http://www.nabble.com/Global-and-Local-Excludes-Being-Ignored-By-Ivy--Config-Prblm-of-Bug---tp17262577p17274992.html
Sent from the ivy-user mailing list archive at Nabble.com.


Re: Global and Local Excludes Being Ignored By Ivy [Config Prblm of Bug?]

Posted by oakridge <ce...@yahoo.com>.
No problem, it looks like you chose the same solution I have for Hibernate. 
For others Michael and I are referencing this thread:

http://www.nabble.com/Exclusions-not-being-excluded-td17065941.html

Thanks,
Julian
-- 
View this message in context: http://www.nabble.com/Global-and-Local-Excludes-Being-Ignored-By-Ivy--Config-Prblm-of-Bug---tp17262577p17280424.html
Sent from the ivy-user mailing list archive at Nabble.com.


Re: Global and Local Excludes Being Ignored By Ivy [Config Prblm of Bug?]

Posted by Michael Laccetti <mi...@s2g.ca>.
I posted a reply in the big long exclusions thread.  My apologies, I should
have put it here.

Mike


oakridge wrote:
> 
> My project depends on a given version of Hibernate...
> 
> Thanks,
> Julian
> 


-----
--
Michael Laccetti                                 (416)558-9718
S2G Limited                                       http://www.s2g.ca/
-- 
View this message in context: http://www.nabble.com/Global-and-Local-Excludes-Being-Ignored-By-Ivy--Config-Prblm-of-Bug---tp17262577p17278557.html
Sent from the ivy-user mailing list archive at Nabble.com.