maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yanko, Curtis" <curt_ya...@uhc.com>
Subject RE: Dependency overriding.
Date Fri, 03 Dec 2010 14:36:40 GMT
How is this an override? You have declared two different things
(different artifactId). But... This is why we don't declare dependencies
in Parent POMs ( I see someone else beat me to the Super POM
clarification).

We only declare dependencies as <dependencyManagement> items in our
Parent POMs and then declare *versionless* dependencies in each app so
they are explicit and comprehensible without having to go look somewhere
else (except for versioning which is all in one place too)

________________________________

Curt Yanko | Continuous Integration Services | UnitedHealth Group IT 
Making IT Happen, one build at a time, 600 times a day
 

> -----Original Message-----
> From: asdas adasads [mailto:zestriddle123456@gmail.com] 
> Sent: Thursday, December 02, 2010 7:14 PM
> To: Maven Users List
> Subject: Dependency overriding.
> 
> Hi,
> 
>     My project has two pom's. One is a called a super pom and 
> contains basic configuration for the whole project. Second 
> pom declares "super pom" as its parent.
> In super pom you can find these dependency:
> 
>        <dependency>
>                 <groupId>org.slf4j</groupId>
>                <artifactId>slf4j-log4j12</artifactId>
>                 <version>1.5.6</version>
>        </dependency>
> 
> Which defines what kind of implementation all project should 
> use for logging. In the second pom (child) I want to declare 
> different logging implementation, namely:
> 
>        <dependency>
>            <groupId>org.slf4j</groupId>
>            <artifactId>slf4j-nop</artifactId>
>            <version>1.5.6</version>
>        </dependency>
> 
> But it seems that the maven builds classpath is a way where 
> dependency from parent is before, dependency from child. So 
> nop logging will not be used during execution.
> Is there any way change that ? (to use nop as logging 
> implementation) I cannot change "super pom" file. The 
> behavior what I'm interested is the same as method overriding in OOP.
> 
> - John
> 

This e-mail, including attachments, may include confidential and/or
proprietary information, and may be used only by the person or entity
to which it is addressed. If the reader of this e-mail is not the intended
recipient or his or her authorized agent, the reader is hereby notified
that any dissemination, distribution or copying of this e-mail is
prohibited. If you have received this e-mail in error, please notify the
sender by replying to this message and delete this e-mail immediately.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message