You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Wayne Fay <wa...@gmail.com> on 2010/01/14 16:11:19 UTC

Re: several poms and dependency

> suppose I specify dependency in war pom file  for a servlet-api 2.4, it
> works  there, that is any other dependecy whihc has transitive dependency
> with a lower version  ot servlet-api   is ignored , but suppose my jar
> project has transitive dependency for the same with a lower version , it
> will not  know about the version decalred in war project and it  puts the
> lower in ear file , so I end up with two differnt versions of the same jar
> in my ear , please tell me hot to avoid this?

Is this actually happening to you, or a concern that it might happen
to you in the future?

If it is happening, then add an exclusion in your ear pom under the
dependency to your jar so servlet-api is not included transitively via
your jar and only via your war. But this should not be happening
(generally) unless perhaps the artifact moved (changed groupId or
artifactId).

Wayne

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


Re: several poms and dependency

Posted by fachhoch <fa...@gmail.com>.
its happening I have to resolve this .

Wayne Fay wrote:
> 
>> suppose I specify dependency in war pom file  for a servlet-api 2.4, it
>> works  there, that is any other dependecy whihc has transitive dependency
>> with a lower version  ot servlet-api   is ignored , but suppose my jar
>> project has transitive dependency for the same with a lower version , it
>> will not  know about the version decalred in war project and it  puts the
>> lower in ear file , so I end up with two differnt versions of the same
>> jar
>> in my ear , please tell me hot to avoid this?
> 
> Is this actually happening to you, or a concern that it might happen
> to you in the future?
> 
> If it is happening, then add an exclusion in your ear pom under the
> dependency to your jar so servlet-api is not included transitively via
> your jar and only via your war. But this should not be happening
> (generally) unless perhaps the artifact moved (changed groupId or
> artifactId).
> 
> Wayne
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/several-poms-and---dependency-tp27159704p27162985.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