You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by kdobrik <kd...@gmail.com> on 2012/03/16 11:11:39 UTC

Transitive Dependencies for Unused Artifact

Hi guys,
I have the following use case. Project with several modules that inherit a
parent POM. Let's say we have 5 modules (e.g. A, B, C, D, E) . In 3  of them
(e.g. A-C) we need ArtifacX. Let's say ArtifacX has a transitive dependency
to log4j version X.
 
My question is: 
If I move ArtifacX dependency into the parent POM (inherited by all 5
modules!), what will happen with the modules that do not need ArtifacX (e.g.
D and E), but make use of log4j? Should I expect that it is possible to
pollute them with the transitive dependency to log4j (let's say v.Y)
introduced by ArtifacX into the parent POM? Do not forget that in fact D and
E do not need ArtifacX, but need log4jX?

Thank you in advance,
kdobri

--
View this message in context: http://maven.40175.n5.nabble.com/Transitive-Dependencies-for-Unused-Artifact-tp5570805p5570805.html
Sent from the Maven - Users mailing list archive at Nabble.com.

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


Re: Transitive Dependencies for Unused Artifact

Posted by kdobrik <kd...@gmail.com>.
Thank you for the answer.
I will revisit my question. At the end of the day I need to centralize the
versions used among all modules. Nevertheless these modules do not share all
the jars needed. I need to refresh my Maven knowledge :)

Once again thank you!

--
View this message in context: http://maven.40175.n5.nabble.com/Transitive-Dependencies-for-Unused-Artifact-tp5570805p5577176.html
Sent from the Maven - Users mailing list archive at Nabble.com.

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


Re: Transitive Dependencies for Unused Artifact

Posted by Ron Wheeler <rw...@artifact-software.com>.
Exclude is your friend.
When declaring ArtifactX as a dependency exclude log4j and include the 
version of log4j that you need as a dependency.

As long as ArtifactX will work with your version of log4j, you are OK.

Ron

On 16/03/2012 6:11 AM, kdobrik wrote:
> Hi guys,
> I have the following use case. Project with several modules that inherit a
> parent POM. Let's say we have 5 modules (e.g. A, B, C, D, E) . In 3  of them
> (e.g. A-C) we need ArtifacX. Let's say ArtifacX has a transitive dependency
> to log4j version X.
>
> My question is:
> If I move ArtifacX dependency into the parent POM (inherited by all 5
> modules!), what will happen with the modules that do not need ArtifacX (e.g.
> D and E), but make use of log4j? Should I expect that it is possible to
> pollute them with the transitive dependency to log4j (let's say v.Y)
> introduced by ArtifacX into the parent POM? Do not forget that in fact D and
> E do not need ArtifacX, but need log4jX?
>
> Thank you in advance,
> kdobri
>
> --
> View this message in context: http://maven.40175.n5.nabble.com/Transitive-Dependencies-for-Unused-Artifact-tp5570805p5570805.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
Ron Wheeler
President
Artifact Software Inc
email: rwheeler@artifact-software.com
skype: ronaldmwheeler
phone: 866-970-2435, ext 102



Re: Transitive Dependencies for Unused Artifact

Posted by kdobrik <kd...@gmail.com>.
Hi Roy!
Right seems this is my best candidate to centralize the versions used among
different modules. 

Thanks!

--
View this message in context: http://maven.40175.n5.nabble.com/Transitive-Dependencies-for-Unused-Artifact-tp5570805p5586942.html
Sent from the Maven - Users mailing list archive at Nabble.com.

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