You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Todd Chapman <to...@chaka.net> on 2014/02/06 16:29:30 UTC

Dependency conflicts when adding Axis2 to large project.

Hello,

We have a multi-module Maven project that we are adding Axis2 to as a
dependency.

The axis2-kernel-1.6.2.pom has a dependency:

       <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
        </dependency>

This seems to conflict with a pre-existing project dependency:

        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <version>3.0.1</version>
        </dependency>

What is the difference between the servlet-api artifact and the
javax.servlet-api artifact? Also why doesn't the axis2-kernel, servlet-api
dependency specify a version?

Thank you for any help!

-Todd

Re: Dependency conflicts when adding Axis2 to large project.

Posted by Andreas Veithen <an...@gmail.com>.
The difference between the two is the version. For some reason, the servlet
API 3.x was imported into Maven central with a different artifact ID. That
is not something we control.

The version of the servlet API used by Axis2 is specified by a
dependencyManagement entry in the parent POM (it is 2 dot something).

The avoid the conflict, add an exclusion to the Axis2 dependency (or
dependencies).

Andreas

On Thursday, February 6, 2014, Todd Chapman <to...@chaka.net> wrote:

> Hello,
>
> We have a multi-module Maven project that we are adding Axis2 to as a
> dependency.
>
> The axis2-kernel-1.6.2.pom has a dependency:
>
>        <dependency>
>             <groupId>javax.servlet</groupId>
>             <artifactId>servlet-api</artifactId>
>         </dependency>
>
> This seems to conflict with a pre-existing project dependency:
>
>         <dependency>
>             <groupId>javax.servlet</groupId>
>             <artifactId>javax.servlet-api</artifactId>
>             <version>3.0.1</version>
>         </dependency>
>
> What is the difference between the servlet-api artifact and the
> javax.servlet-api artifact? Also why doesn't the axis2-kernel, servlet-api
> dependency specify a version?
>
> Thank you for any help!
>
> -Todd
>
>

Re: Dependency conflicts when adding Axis2 to large project.

Posted by Todd Chapman <to...@chaka.net>.
Thank you for the input Martin. Commenting out the axis-xmlbeans artifact
dependency caused further compilation errors. The code that is using Axis2
was generated by another group. I'll check with them to see what command
they used to generate the code.

-Todd



On Thu, Feb 6, 2014 at 9:19 PM, Martin Gainty <mg...@hotmail.com> wrote:

> Todd=
>
> Thats because you have ADB code which is the default binding
> WSDL2Java Test.wsdl
>
> Im betting you didnt specify -Dxmlbeans to generate the code from wsdl2java
> in which case you want the ADB code (comment out the axis-xmlbeans
> artifact as dependency)
>
> http://axis.apache.org/axis/java/user-guide.html
>
> Good Luck
>  Martin-
>
>
>  ------------------------------
> Date: Thu, 6 Feb 2014 16:02:56 -0500
> Subject: Re: Dependency conflicts when adding Axis2 to large project.
> From: todd@chaka.net
> To: java-user@axis.apache.org
>
>
> Shameera,
>
> I created a small project on Github that demonstrates my problem.
>
> https://github.com/chakatodd/axis2_dependency_woes
>
>
> On Thu, Feb 6, 2014 at 1:59 PM, Shameera Rathnayaka <
> shameerainfo@gmail.com> wrote:
>
>  Hi Todd,
>
> Are you going to fork Axis2 release code ? if not you can specify
> axis2-1.6.2 maven dependency  as follows,
>  <dependency>
>     <groupId>org.apache.axis2</groupId>
>     <artifactId>axis2</artifactId>
>     <version>1.6.2</version>
> </dependency>
>
> Axis2 use maven dependency management to maintain the same version across
> the all modules. you can find the version for servlet-api in pom.xml of
> axis2 parent module.  axis2 1.6.2 use servlet.api version 2.3.
>
> Thanks,
> Shameera.
>
>
> On Thu, Feb 6, 2014 at 8:59 PM, Todd Chapman <to...@chaka.net> wrote:
>
> Hello,
>
> We have a multi-module Maven project that we are adding Axis2 to as a
> dependency.
>
> The axis2-kernel-1.6.2.pom has a dependency:
>
>         <dependency>
>             <groupId>javax.servlet</groupId>
>             <artifactId>servlet-api</artifactId>
>         </dependency>
>
> This seems to conflict with a pre-existing project dependency:
>
>          <dependency>
>             <groupId>javax.servlet</groupId>
>             <artifactId>javax.servlet-api</artifactId>
>             <version>3.0.1</version>
>         </dependency>
>
> What is the difference between the servlet-api artifact and the
> javax.servlet-api artifact? Also why doesn't the axis2-kernel, servlet-api
> dependency specify a version?
>
> Thank you for any help!
>
> -Todd
>
>
>
>
> --
>  Best Regards,
> Shameera Rathnayaka.
>
> email: shameera AT apache.org , shameerainfo AT gmail.com
> Blog : http://shameerarathnayaka.blogspot.com/
>
>
>

RE: Dependency conflicts when adding Axis2 to large project.

Posted by Martin Gainty <mg...@hotmail.com>.
Todd=

 

Thats because you have ADB code which is the default binding

WSDL2Java Test.wsdl

 

Im betting you didnt specify -Dxmlbeans to generate the code from wsdl2java

in which case you want the ADB code (comment out the axis-xmlbeans artifact as dependency)

 

http://axis.apache.org/axis/java/user-guide.html

 

Good Luck
 Martin-
  





Date: Thu, 6 Feb 2014 16:02:56 -0500
Subject: Re: Dependency conflicts when adding Axis2 to large project.
From: todd@chaka.net
To: java-user@axis.apache.org


Shameera, 


I created a small project on Github that demonstrates my problem.


https://github.com/chakatodd/axis2_dependency_woes




On Thu, Feb 6, 2014 at 1:59 PM, Shameera Rathnayaka <sh...@gmail.com> wrote:



Hi Todd, 


Are you going to fork Axis2 release code ? if not you can specify axis2-1.6.2 maven dependency  as follows,


<dependency>
    <groupId>org.apache.axis2</groupId>
    <artifactId>axis2</artifactId>
    <version>1.6.2</version>
</dependency>


Axis2 use maven dependency management to maintain the same version across the all modules. you can find the version for servlet-api in pom.xml of axis2 parent module.  axis2 1.6.2 use servlet.api version 2.3. 


Thanks, 

Shameera.






On Thu, Feb 6, 2014 at 8:59 PM, Todd Chapman <to...@chaka.net> wrote:


Hello, 


We have a multi-module Maven project that we are adding Axis2 to as a dependency.


The axis2-kernel-1.6.2.pom has a dependency:



       <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
        </dependency>


This seems to conflict with a pre-existing project dependency:



        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <version>3.0.1</version>
        </dependency>


What is the difference between the servlet-api artifact and the javax.servlet-api artifact? Also why doesn't the axis2-kernel, servlet-api dependency specify a version?


Thank you for any help!


-Todd



-- 


Best Regards,Shameera Rathnayaka. 



email: shameera AT apache.org , shameerainfo AT gmail.comBlog : http://shameerarathnayaka.blogspot.com/

 		 	   		  

Re: Dependency conflicts when adding Axis2 to large project.

Posted by Todd Chapman <to...@chaka.net>.
Shameera,

I created a small project on Github that demonstrates my problem.

https://github.com/chakatodd/axis2_dependency_woes


On Thu, Feb 6, 2014 at 1:59 PM, Shameera Rathnayaka
<sh...@gmail.com>wrote:

> Hi Todd,
>
> Are you going to fork Axis2 release code ? if not you can specify
> axis2-1.6.2 maven dependency  as follows,
> <dependency>
>     <groupId>org.apache.axis2</groupId>
>     <artifactId>axis2</artifactId>
>     <version>1.6.2</version>
> </dependency>
>
> Axis2 use maven dependency management to maintain the same version across
> the all modules. you can find the version for servlet-api in pom.xml of
> axis2 parent module.  axis2 1.6.2 use servlet.api version 2.3.
>
> Thanks,
> Shameera.
>
>
> On Thu, Feb 6, 2014 at 8:59 PM, Todd Chapman <to...@chaka.net> wrote:
>
>> Hello,
>>
>> We have a multi-module Maven project that we are adding Axis2 to as a
>> dependency.
>>
>> The axis2-kernel-1.6.2.pom has a dependency:
>>
>>        <dependency>
>>             <groupId>javax.servlet</groupId>
>>             <artifactId>servlet-api</artifactId>
>>         </dependency>
>>
>> This seems to conflict with a pre-existing project dependency:
>>
>>         <dependency>
>>             <groupId>javax.servlet</groupId>
>>             <artifactId>javax.servlet-api</artifactId>
>>             <version>3.0.1</version>
>>         </dependency>
>>
>> What is the difference between the servlet-api artifact and the
>> javax.servlet-api artifact? Also why doesn't the axis2-kernel, servlet-api
>> dependency specify a version?
>>
>> Thank you for any help!
>>
>> -Todd
>>
>>
>
>
> --
> Best Regards,
> Shameera Rathnayaka.
>
> email: shameera AT apache.org , shameerainfo AT gmail.com
> Blog : http://shameerarathnayaka.blogspot.com/
>

Re: Dependency conflicts when adding Axis2 to large project.

Posted by Shameera Rathnayaka <sh...@gmail.com>.
Hi Todd,

Are you going to fork Axis2 release code ? if not you can specify
axis2-1.6.2 maven dependency  as follows,
<dependency>
    <groupId>org.apache.axis2</groupId>
    <artifactId>axis2</artifactId>
    <version>1.6.2</version>
</dependency>

Axis2 use maven dependency management to maintain the same version across
the all modules. you can find the version for servlet-api in pom.xml of
axis2 parent module.  axis2 1.6.2 use servlet.api version 2.3.

Thanks,
Shameera.


On Thu, Feb 6, 2014 at 8:59 PM, Todd Chapman <to...@chaka.net> wrote:

> Hello,
>
> We have a multi-module Maven project that we are adding Axis2 to as a
> dependency.
>
> The axis2-kernel-1.6.2.pom has a dependency:
>
>        <dependency>
>             <groupId>javax.servlet</groupId>
>             <artifactId>servlet-api</artifactId>
>         </dependency>
>
> This seems to conflict with a pre-existing project dependency:
>
>         <dependency>
>             <groupId>javax.servlet</groupId>
>             <artifactId>javax.servlet-api</artifactId>
>             <version>3.0.1</version>
>         </dependency>
>
> What is the difference between the servlet-api artifact and the
> javax.servlet-api artifact? Also why doesn't the axis2-kernel, servlet-api
> dependency specify a version?
>
> Thank you for any help!
>
> -Todd
>
>


-- 
Best Regards,
Shameera Rathnayaka.

email: shameera AT apache.org , shameerainfo AT gmail.com
Blog : http://shameerarathnayaka.blogspot.com/