You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Suneet Shah <su...@gmail.com> on 2008/11/29 18:05:57 UTC

Problem doing a build using Maven and Spring

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




Re: Problem doing a build using Maven and Spring

Posted by Suneet Shah <su...@gmail.com>.
Thanks Glen.
I will strip this down and add dependencies as needed.

Regards
Suneet


Glen Mazza wrote:
> One more issue that might be making your troubleshooting more difficult--you
> seem to have a *lot* of CXF dependencies listed--are you sure you need all
> of those?  CXF typically requires far fewer for basic use cases:
>
> http://www.jroller.com/gmazza/entry/creating_a_wsdl_first_web1#WFstep3
>
> Glen
>
>
> sshah wrote:
>   
>> Hello:
>>
>> I am trying to use CXF 2.1.3 with Spring 2.5.5 and am using maven to 
>> build my project.
>>
>>     
>
>   

Re: Problem doing a build using Maven and Spring

Posted by Glen Mazza <gl...@gmail.com>.
One more issue that might be making your troubleshooting more difficult--you
seem to have a *lot* of CXF dependencies listed--are you sure you need all
of those?  CXF typically requires far fewer for basic use cases:

http://www.jroller.com/gmazza/entry/creating_a_wsdl_first_web1#WFstep3

Glen


sshah wrote:
> 
> Hello:
> 
> I am trying to use CXF 2.1.3 with Spring 2.5.5 and am using maven to 
> build my project.
> 

-- 
View this message in context: http://www.nabble.com/Problem-doing-a-build-using-Maven-and-Spring-tp20749119p20753371.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: Problem doing a build using Maven and Spring

Posted by Daniel Kulp <dk...@apache.org>.
It's part of the dependency plugin.   Normally, you just need to run:

mvn dependency:tree

and it will spit out a nice pretty tree of your dependencies and where they 
come from and such.  Thus, you can add the excludes the appropriate places 
and such.

Dan


On Sunday 30 November 2008 5:03:40 pm Aaron Mulder wrote:
> If you can't find the debugging option, just delete the 2.0.8 JARs
> from your local repository and do an offline build (mvn -o install)
> and when it fails on the missing 2.0.8 dependencies it will list what
> other dependencies are depending on those and you can build the
> exclusions from there.  I've also seen something bring in
> spring-support-2.0.8.jar I think.
>
> Thanks,
>       Aaron
>
> On Sat, Nov 29, 2008 at 7:34 PM, Glen Mazza <gl...@gmail.com> wrote:
> > I believe Maven has some debugging functionality that lets you know the
> > (sub)dependencies that each dependency will load--if you can run that
> > (and hopefully the Maven users ML or someone here can tell you what it
> > is), you will be able to identify those dependencies you have listed
> > below that are bringing in Spring 2.0.8 stuff.  From that, you should be
> > able to add an <exclusion/> on Spring 2.0.x within each "guilty"
> > <dependency/> so those unwanted Spring jars will not be brought in.
> >
> > HTH,
> > Glen
> >
> > sshah 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
> >
> > --
> > View this message in context:
> > http://www.nabble.com/Problem-doing-a-build-using-Maven-and-Spring-tp2074
> >9119p20753278.html Sent from the cxf-user mailing list archive at
> > Nabble.com.



-- 
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog

Re: Problem doing a build using Maven and Spring

Posted by Aaron Mulder <am...@alumni.princeton.edu>.
If you can't find the debugging option, just delete the 2.0.8 JARs
from your local repository and do an offline build (mvn -o install)
and when it fails on the missing 2.0.8 dependencies it will list what
other dependencies are depending on those and you can build the
exclusions from there.  I've also seen something bring in
spring-support-2.0.8.jar I think.

Thanks,
      Aaron

On Sat, Nov 29, 2008 at 7:34 PM, Glen Mazza <gl...@gmail.com> wrote:
>
> I believe Maven has some debugging functionality that lets you know the
> (sub)dependencies that each dependency will load--if you can run that (and
> hopefully the Maven users ML or someone here can tell you what it is), you
> will be able to identify those dependencies you have listed below that are
> bringing in Spring 2.0.8 stuff.  From that, you should be able to add an
> <exclusion/> on Spring 2.0.x within each "guilty" <dependency/> so those
> unwanted Spring jars will not be brought in.
>
> HTH,
> Glen
>
>
> sshah 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
>>
>>
>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/Problem-doing-a-build-using-Maven-and-Spring-tp20749119p20753278.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>
>

Re: Problem doing a build using Maven and Spring

Posted by Suneet Shah <su...@gmail.com>.
Thanks Brad and Glen.
I will dig deeper into this. I  did comment out my Spring 2.5.5 entries 
and it now brings in a slew of Spring 2.0.8 tags.

Regards
Suneet


Brad O'Hearne wrote:
> Glen is right -- another way you can likely accomplish this is just 
> altering the order of dependencies in your pom.xml.
>
> Brad
>
> On Nov 29, 2008, at 5:34 PM, Glen Mazza wrote:
>
>>
>> I believe Maven has some debugging functionality that lets you know the
>> (sub)dependencies that each dependency will load--if you can run that 
>> (and
>> hopefully the Maven users ML or someone here can tell you what it 
>> is), you
>> will be able to identify those dependencies you have listed below 
>> that are
>> bringing in Spring 2.0.8 stuff.  From that, you should be able to add an
>> <exclusion/> on Spring 2.0.x within each "guilty" <dependency/> so those
>> unwanted Spring jars will not be brought in.
>>
>> HTH,
>> Glen
>>
>>
>> sshah 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
>>>
>>>
>>>
>>>
>>>
>>
>> -- 
>> View this message in context: 
>> http://www.nabble.com/Problem-doing-a-build-using-Maven-and-Spring-tp20749119p20753278.html 
>>
>> Sent from the cxf-user mailing list archive at Nabble.com.
>>
>
>

Re: Problem doing a build using Maven and Spring

Posted by Brad O'Hearne <br...@bighillsoftware.com>.
Glen is right -- another way you can likely accomplish this is just  
altering the order of dependencies in your pom.xml.

Brad

On Nov 29, 2008, at 5:34 PM, Glen Mazza wrote:

>
> I believe Maven has some debugging functionality that lets you know  
> the
> (sub)dependencies that each dependency will load--if you can run  
> that (and
> hopefully the Maven users ML or someone here can tell you what it  
> is), you
> will be able to identify those dependencies you have listed below  
> that are
> bringing in Spring 2.0.8 stuff.  From that, you should be able to  
> add an
> <exclusion/> on Spring 2.0.x within each "guilty" <dependency/> so  
> those
> unwanted Spring jars will not be brought in.
>
> HTH,
> Glen
>
>
> sshah 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
>>
>>
>>
>>
>>
>
> -- 
> View this message in context: http://www.nabble.com/Problem-doing-a-build-using-Maven-and-Spring-tp20749119p20753278.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>


Re: Problem doing a build using Maven and Spring

Posted by Glen Mazza <gl...@gmail.com>.
I believe Maven has some debugging functionality that lets you know the
(sub)dependencies that each dependency will load--if you can run that (and
hopefully the Maven users ML or someone here can tell you what it is), you
will be able to identify those dependencies you have listed below that are
bringing in Spring 2.0.8 stuff.  From that, you should be able to add an
<exclusion/> on Spring 2.0.x within each "guilty" <dependency/> so those
unwanted Spring jars will not be brought in.

HTH,
Glen


sshah 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
> 
> 
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Problem-doing-a-build-using-Maven-and-Spring-tp20749119p20753278.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: Problem doing a build using Maven and Spring

Posted by Brad O'Hearne <br...@bighillsoftware.com>.
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
>
>
>