I'm new to axis, please be patient. I've generated java files from WSDL endpoint, and each java file has
implements org.apache.axis2.databinding.ADBBean{
which means that I need to have dependency of axis2.jar in maven pom.xml in compile scope (please correct me if i'm wrong).
But that axis2.jar dependency also downloads a lot of geronimo files. But I'm using JBOSS. I don't actually want geronimo files in my war.
Is this really necessary to have these geronimo jars? Or maybe I'm doing something wrong when specify axis2.jar compile-time dependency in pom.xml?
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.4</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2</artifactId>
<version>1.6.2</version>
</dependency>
<dependency>
<groupId>org.apache.ws.commons.axiom</groupId>
<artifactId>axiom-api</artifactId>
<version>1.2.14</version>
</dependency>
<dependency>
<groupId>org.apache.ws.commons.axiom</groupId>
<artifactId>axiom-impl</artifactId>
<version>1.2.14</version>
</dependency>
<dependency>
<groupId>org.apache.ws.commons.schema</groupId>
<artifactId>XmlSchema</artifactId>
<version>1.3.2</version>
</dependency>
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-transport-local</artifactId>
<version>1.6.2</version>
</dependency>
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-transport-http</artifactId>
<version>1.6.2</version>
</dependency>
<dependency>
<groupId>org.apache.neethi</groupId>
<artifactId>neethi</artifactId>
<version>3.0.2</version>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-jta_1.1_spec</artifactId>
<version>1.1</version>
<scope>provided</scope>
</dependency>
In fact, the free online book "Maven: The Complete Reference" depicts your exact case in their section "Conflict Resolution"
The Apache Axis2 libraries you depend on implement part of the Java EE spec and thus have compile scope transitive dependencies on the Geronimo "Java EE Spec" libraries. These spec libraries merely implement the Java EE standard. So if you inspect the contents of (for example)
jar -tf geronimo-javamail_1.4_spec-1.7.1.jar
You'll find (among other things).
javax/
javax/mail/
javax/mail/Address.class
javax/mail/AuthenticationFailedException.class
javax/mail/Authenticator.class
(etc.)
So, there should be no harm in deploying these Geronimo jars with your application, but if it really bothers you (or if you do in fact encounter a problem), you can exclude the transitive dependencies with an <exclusions>
block:
<dependency>
<groupId>org.apache.ws.commons.axiom</groupId>
<artifactId>axiom-api</artifactId>
<version>1.2.14</version>
<exclusions>
<exclusion>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-activation_1.1_spec</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-javamail_1.4_spec</artifactId>
</exclusion>
</exclusions>
</dependency>
JBoss ships its own spec jars, but you shouldn't bother going through the trouble of excluding the geronimo Jars unless you hit an actual issue.
Alternatively, you could consider just using the JBoss Web Services if you know for sure that is your deployment container.