cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brad O'Hearne <br...@bighillsoftware.com>
Subject Re: Problem doing a build using Maven and Spring
Date Sun, 30 Nov 2008 00:29:11 GMT
Suneet,

You wrote:

 >However, when I do a build its bringing in a couple of spring 2.0.8  
jar files (spring-beans-2.0.8.jar and spring-web-2.0.8)

Do you know what "It" is? Something is dependent on those jars, and  
the way maven works is that the first version of a dependency pulled  
(even indirect dependencies) across all declared dependencies is the  
one that will be used. Hence, if you have:

>   <dependency>
>     <groupId>ME</groupId>
>     <artifactId>A</artifactId>
>     <version>1.0.0</version>
>   </dependency>

>   <dependency>
>     <groupId>ME</groupId>
>     <artifactId>B</artifactId>
>     <version>1.0.0</version>
>   </dependency>

and both A and B depend on C, but A depends on C version 1.0.0 and B  
depends on C version 2.0.0, A's dependency version will be used, so  
1.0.0 will be used, regardless of B's dependency. And get this, that  
will happen even if you explicitly declare C as a dependency with  
version 2.0.0 in your pom.xml, if the 1.0.0 version is detected first.

Having said that, your original question -- *what* exactly is  
responsible (dependent on) for pulling in those spring 2.0.8 jar files?

Brad

On Nov 29, 2008, at 10:05 AM, Suneet Shah wrote:

> Hello:
>
> I am trying to use CXF 2.1.3 with Spring 2.5.5 and am using maven to  
> build my project. However, when I do a build its bringing in a  
> couple of spring 2.0.8 jar files (spring-beans-2.0.8.jar and spring- 
> web-2.0.8).  When trying to write a test client that also uses  
> spring, its not able to resolve between these two versions. Any  
> thoughts on how I can avoid bringing the 2.0.8 jars?
>
> My POM file dependencies are listed below.
>
> <dependencies>
>   <dependency>
>     <groupId>log4j</groupId>
>     <artifactId>log4j</artifactId>
>     <version>1.2.14</version>
>   </dependency>
>   <dependency>
>     <groupId>aopalliance</groupId>
>     <artifactId>aopalliance</artifactId>
>     <version>1.0</version>
>   </dependency>
>   <dependency>
>     <groupId>aspectj</groupId>
>     <artifactId>aspectjrt</artifactId>
>     <version>1.5.3</version>
>   </dependency>
>   <dependency>
>     <groupId>aspectj</groupId>
>     <artifactId>aspectjweaver</artifactId>
>     <version>1.5.3</version>
>   </dependency>
> <dependency>
>     <groupId>org.springframework</groupId>
>     <artifactId>spring-core</artifactId>
>     <version>2.5.5</version>
>   </dependency>
>   <dependency>
>     <groupId>org.springframework</groupId>
>     <artifactId>spring-aop</artifactId>
>     <version>2.5.5</version>
>   </dependency>
>   <dependency>
>     <groupId>org.springframework</groupId>
>     <artifactId>spring-context</artifactId>
>     <version>2.5.5</version>
>   </dependency>
>   <dependency>
>     <groupId>org.springframework</groupId>
>     <artifactId>spring-context-support</artifactId>
>     <version>2.5.5</version>
>   </dependency>
>   <dependency>
>     <groupId>org.springframework</groupId>
>     <artifactId>spring-tx</artifactId>
>     <version>2.5.5</version>
>   </dependency>
>   <dependency>
>     <groupId>org.springframework</groupId>
>     <artifactId>spring-jms</artifactId>
>     <version>2.5.5</version>
>   </dependency>
>   <dependency>
>     <groupId>org.springframework</groupId>
>     <artifactId>spring-test</artifactId>
>     <version>2.5.5</version>
>   </dependency>
>
>   <dependency>
>     <groupId>org.apache.cxf</groupId>
>     <artifactId>cxf-rt-core</artifactId>
>     <version>${cxf.version}</version>
>   </dependency>
>   <dependency>
>     <groupId>org.apache.cxf</groupId>
>     <artifactId>cxf-common-utilities</artifactId>
>     <version>${cxf.version}</version>
>   </dependency>
>   <dependency>
>     <groupId>org.apache.cxf</groupId>
>     <artifactId>cxf-rt-frontend-jaxws</artifactId>
>     <version>${cxf.version}</version>
>   </dependency>
>   <dependency>
>     <groupId>org.apache.cxf</groupId>
>     <artifactId>cxf-rt-transports-http</artifactId>
>     <version>${cxf.version}</version>
>   </dependency>
>           <dependency>
>     <groupId>org.apache.cxf</groupId>
>     <artifactId>cxf-rt-frontend-simple</artifactId>
>     <version>${cxf.version}</version>
>   </dependency>
>    <dependency>
>     <groupId>org.apache.cxf</groupId>
>     <artifactId>cxf-rt-frontend-jaxws</artifactId>
>     <version>${cxf.version}</version>
>   </dependency>
>       <dependency>
>     <groupId>org.apache.cxf</groupId>
>     <artifactId>cxf-rt-databinding-aegis</artifactId>
>     <version>${cxf.version}</version>
>   </dependency>
>     <dependency>
>     <groupId>org.apache.cxf</groupId>
>     <artifactId>cxf-rt-transports-local</artifactId>
>     <version>${cxf.version}</version>
>   </dependency>
>   <dependency>
>     <groupId>org.apache.cxf</groupId>
>     <artifactId>cxf-rt-transports-jms</artifactId>
>     <version>${cxf.version}</version>
>   </dependency>
>   <dependency>
>     <groupId>org.apache.cxf</groupId>
>     <artifactId>cxf-rt-management</artifactId>
>     <version>${cxf.version}</version>
>   </dependency>
>    <dependency>
>     <groupId>xerces</groupId>
>     <artifactId>xercesImpl</artifactId>
>     <version>2.8.1</version>
>   </dependency>
>   <dependency>
>     <groupId>xalan</groupId>
>     <artifactId>xalan</artifactId>
>     <version>2.7.0</version>
>   </dependency>
>
>   <dependency>
>     <groupId>junit</groupId>
>     <artifactId>junit</artifactId>
>     <version>4.1</version>
>   </dependency>
>
>
> </dependencies>
> <properties>
>   <cxf.version>2.1.3</cxf.version>
> </properties>
>
>
> thanks
>
>
>


Mime
View raw message