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 John <ve...@gmx.net> on 2010/03/03 08:06:05 UTC

overriding dependencies??

Hi!

Most apache libs depends on commons-logging, so when retrieving e.g.
commons-lang, commons-logging.jar will also retrieved.
Now we've decided to switch to slf4j and not using commons-logging.
slf4j provides a bridge jcl-over-slfj4.jar which can be used instead
of commons-logging.jar, so commons-logging.jar must not in the
classpath.
Is there a way to tell ivy to retrieve jcl-over-slfj4.jar where
commons-logging.jar is requested? Or do I have to manually edit all
ivys where commons-logging is a dependency? Or what's the best way to
handle this requirement?

Thx, John

Re: overriding dependencies??

Posted by John <ve...@gmx.net>.
Thank you for your answer - "exclude" will work fine for our purposes!

John

2010/3/3 Maarten Coene <ma...@yahoo.com>:
> Maybe you could use the exclude functionality in your ivy.xml files?This way you can exclude commons-logging, even if other modules depend on it.
> Cfr. http://ant.apache.org/ivy/history/latest-milestone/ivyfile/exclude.html
>
> But this would require modifying all ivy.xml files of your top-level modules.
> I don't think there is an option to do this globally with a simple setting...
>
> Maarten
>
>
>
>
> ----- Original Message ----
> From: John <ve...@gmx.net>
> To: ivy-user@ant.apache.org
> Sent: Wed, March 3, 2010 8:06:05 AM
> Subject: overriding dependencies??
>
> Hi!
>
> Most apache libs depends on commons-logging, so when retrieving e.g.
> commons-lang, commons-logging.jar will also retrieved.
> Now we've decided to switch to slf4j and not using commons-logging.
> slf4j provides a bridge jcl-over-slfj4.jar which can be used instead
> of commons-logging.jar, so commons-logging.jar must not in the
> classpath.
> Is there a way to tell ivy to retrieve jcl-over-slfj4.jar where
> commons-logging.jar is requested? Or do I have to manually edit all
> ivys where commons-logging is a dependency? Or what's the best way to
> handle this requirement?
>
> Thx, John
>
>
>
>
>
>

Re: overriding dependencies??

Posted by Maarten Coene <ma...@yahoo.com>.
Maybe you could use the exclude functionality in your ivy.xml files?This way you can exclude commons-logging, even if other modules depend on it.
Cfr. http://ant.apache.org/ivy/history/latest-milestone/ivyfile/exclude.html

But this would require modifying all ivy.xml files of your top-level modules.
I don't think there is an option to do this globally with a simple setting...

Maarten




----- Original Message ----
From: John <ve...@gmx.net>
To: ivy-user@ant.apache.org
Sent: Wed, March 3, 2010 8:06:05 AM
Subject: overriding dependencies??

Hi!

Most apache libs depends on commons-logging, so when retrieving e.g.
commons-lang, commons-logging.jar will also retrieved.
Now we've decided to switch to slf4j and not using commons-logging.
slf4j provides a bridge jcl-over-slfj4.jar which can be used instead
of commons-logging.jar, so commons-logging.jar must not in the
classpath.
Is there a way to tell ivy to retrieve jcl-over-slfj4.jar where
commons-logging.jar is requested? Or do I have to manually edit all
ivys where commons-logging is a dependency? Or what's the best way to
handle this requirement?

Thx, John