Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » IAM (Eclipse Integration for Apache Maven) » Picking up wrong version of dependency if dependent project open
Picking up wrong version of dependency if dependent project open [message #571109] Tue, 03 November 2009 17:41
Morris Jones is currently offline Morris Jones
Messages: 10
Registered: November 2009
Junior Member
Here's the outline of my problem.

I'm building a web service using CXF version 2.2.4. The web service pulls from a platform library that includes a dependency on CXF 2.0.4.

In my project POM, I exclude cxf-api from the dependency, and include cxf-api with the correct version as a dependency. Yet IAM fails to honor the exclusion if I have the platform library open as a project in Eclipse.

If I close the platform project, then IAM gets the correct CXF version from my repository.

In my project POM, the platform library is included as follows, note the exclusion of cxf-api:


<dependency>
<groupId>com.my.project</groupId>
<artifactId>proj-platform</artifactId>
<version>${project.version}</version>
<exclusions>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxws</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-transports-http</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-transports-http-jetty</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-core</artifactId>
</exclusion>
</exclusions>
</dependency>


Meanwhile, above that exclusion in the pom file, is this dependency inclusion. ${cxf.version} is defined above as 2.2.4:


<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-api</artifactId>
<version>${cxf.version}</version>
<exclusions>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
</exclusion>
</exclusions>
</dependency>


There's another issue too, with IAM rearranging my library order. I'll mention that in a different post.

Mojo
--
Morris Jones
Monrovia, CA
http://mojo.whiteoaks.com
Previous Topic:java version used by IAM?
Next Topic:Picking up wrong version of dependency if dependent project open
Goto Forum:
  


Current Time: Wed Oct 22 22:37:23 GMT 2014

Powered by FUDForum. Page generated in 0.11904 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software