We recently ran into an issue in our project. Our project converts
WSDL files into Java files and compiles them. To handle this, we use
org.codehaus.mojo:axistools-maven-plugin:1.2. We also specify the
dependencies on artifacts org.apache.axis:axis:1.4,
org.apache.axis:axis-jaxrpc:1.4 in our pom.xml.

Everything was fine until one day our Hudson builds started failing.
We were getting the error "cannot access javax.xml.soap.SOAPMessage
file javax/xml/soap/SOAPMessage.class not found".

This is from using inMsg.getSOAPPartAsSTring which is in the class
org.apache.axis.AxisFault which is documented in use of the
axis-1.4.jar.

We quickly discovered that the build will work with JDK1.6, but not
JDK1.5 (which is what we were using) or JDK1.4. We traced this down to
a missing classfile found in axis-saaj-1.4.jar.

After further work, we suddenly discovered that the build was once
again working no matter which JDK we were actually using for
compiling. I decided to clean out the $HOME/.m2/repository directory
to see what was downloading, and noticed that axis-saaj-1.4.jar was
downloading. We looked at the pom files for artifacts
org.apache.axis:axis-1.4.pom and org.apache.axis:axis-jaxrpc:1.4., but
found no dependency on axis-saaj-1.4.jar stated there.

We then realized that both axis:axis:1.4 and apache.org.axis:axis.1.4
were both being downloaded into the $HOME/.m2/respository directory
but couldn't find any difference in the two axis-1.4.jars. However we
then examined the poms and found a difference: axis:axis:1.4 has a
dependency on axis-saaj-1.4.jar while org.apache.axis:axis:1.4 does
not.

Further research found what was actually downloading
axis-saaj-1.4.jar. It was org.codehaus.mojo:axistools-maven-plugin:1.2
which states its dependency upon the artifact axis:axis:1.4 and not
org.apache.axis:axis:1.4. (This mojo also does not state a dependency
upon the axis-saaj-1.4.jar, but uses the axis:axis:1.4 artifact to
declare that dependency) More interesting is this comment found in the
axistools-maven-plugin's POM file.

        POM under org.apache.axis groupId doesn't declare meta-datas
       and cannot be overriden in <plugin><dependencies>  to use an older
       axis release.

So, what is going on? Should we be using axis:axis:1.4 as our
dependent artifact instead of org.apache.axis:axis:1.4? Why did the
compilation stop working for a day? Why the two different ways to
state the same axis-1.4.jar?

Where can I find any documentation mentioning using the artifact
axis:axis:1.4 vs. org.apache.axis:axis:1.4?

-- 
David Weintraub
[email protected]

All attachments have been scanned for viruses and have been found to
be virus free. So,  just go ahead and open them. Go ahead... Just
click on it... Trust me.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to