You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Kristian Rink <ka...@zimmer428.net> on 2008/07/11 09:47:25 UTC
global exclusions?
Folks;
in my environment, I do have a parent pom all my projects do inherit
from. This parent pom is used, among other things, to keep global
dependencies. My question on that, however: Asides from declaring
dependencies which effectively state what is needed, is there a way to
also declare "global exclusions" to, regardless of artifacts included,
state what artifacts _not at all_ to include?
To outline what I want: We do use slf4j for logging, along with
jcl-over-slf4j (briding commons-logging output to slf4j) or
log4j-over-slf4j (bridging log4j output to slf4j) so no matter what
happens I don't want to, say, have any artifact (Spring likes to do
this, in example...) pull commons-logging as a transitive dependency
simply because this is already satisfied by jcl-over-slf4j and would
just cause trouble. So far however I have to manually define an
exclusion to that for every required project and every dependency
manually which doesn't seem that comfortable a thing to do. Can this be
done somehow smarter?
Thanks in advance, best regards.
Kristian
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: global exclusions?
Posted by Jan Fredrik Wedén <jf...@gmail.com>.
On Fri, Jul 11, 2008 at 9:47 AM, Kristian Rink <ka...@zimmer428.net> wrote:
> Folks;
>
> in my environment, I do have a parent pom all my projects do inherit
> from. This parent pom is used, among other things, to keep global
> dependencies. My question on that, however: Asides from declaring
> dependencies which effectively state what is needed, is there a way to
> also declare "global exclusions" to, regardless of artifacts included,
> state what artifacts _not at all_ to include?
>
> To outline what I want: We do use slf4j for logging, along with
> jcl-over-slf4j (briding commons-logging output to slf4j) or
> log4j-over-slf4j (bridging log4j output to slf4j) so no matter what
> happens I don't want to, say, have any artifact (Spring likes to do
> this, in example...) pull commons-logging as a transitive dependency
> simply because this is already satisfied by jcl-over-slf4j and would
> just cause trouble. So far however I have to manually define an
> exclusion to that for every required project and every dependency
> manually which doesn't seem that comfortable a thing to do. Can this be
> done somehow smarter?
>
> Thanks in advance, best regards.
> Kristian
>From what I know this is not supported in Maven 2.0.x. You'll have to
do the manual labour of specifying exclusions for every dependency
which pulls in what you don't want.
I think there's a jira for this somewhere which might be scheduled for 2.1.
--
- Jan Fredrik Wedén
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: global exclusions?
Posted by Kristian Rink <ka...@zimmer428.net>.
Wendy Smoak schrieb:
>> Asides from declaring
>> dependencies which effectively state what is needed, is there a way to
>> also declare "global exclusions" to, regardless of artifacts included,
>> state what artifacts _not at all_ to include?
>
> I believe you'll still have to do the excludes, but the Enforcer
> plugin can help you make sure things don't creep in:
> http://maven.apache.org/plugins/maven-enforcer-plugin/rules/bannedDependencies.html
Aaah I see. Gonna give this a try, thanks so far for pointing me there.
:) As far as the metadata manipulation is concerned: Though we're
running our internal archiva proxy, messing with metadata of "external"
artifacts isn't really what I would come down to, so guess I'll just see
how far the enforcer does get me and wait for this feature to maybe be
in a future version otherwise. :)
Thanks a bunch for your hints anyone.
Cheers,
Kristian
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: global exclusions?
Posted by Wendy Smoak <ws...@gmail.com>.
On Fri, Jul 11, 2008 at 12:47 AM, Kristian Rink <ka...@zimmer428.net> wrote:
> Asides from declaring
> dependencies which effectively state what is needed, is there a way to
> also declare "global exclusions" to, regardless of artifacts included,
> state what artifacts _not at all_ to include?
I believe you'll still have to do the excludes, but the Enforcer
plugin can help you make sure things don't creep in:
http://maven.apache.org/plugins/maven-enforcer-plugin/rules/bannedDependencies.html
If you have your own internal managed repository (and you restrict
access to central and other public repos) then you do have the option
of fixing the metadata. This isn't something I do very often, but if
you're going to have miles of xml for excludes vs. editing some poms
in your internal repo, it might be something to consider. Make sure
to keep track of what you've changed.
--
Wendy
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org