Picking up wrong version of dependency if dependent project open [message #571109] |
Tue, 03 November 2009 17:41 |
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
|
|
|
Powered by
FUDForum. Page generated in 0.02783 seconds