Compiling ant with wsimport error: taskdef class com.sun.tools.ws.ant.WsImport cannot be found

I got this error encountered though it's just a simple fix, however, I wanted to take notes on the XML element when executing a wsimport tool.

To fix this problem, just add <pathelement /> and point where does your jax-ws tool is located. See below,

<taskdef name="wsimport" classname="com.sun.tools.ws.ant.WsImport">
    <classpath>
        <pathelement location="${jwsdp.home}/lib2/jaxws-tools.jar"/>
    </classpath>
</taskdef>


where your ${jwsdp.home} is setup as a property value, seen below.



  <property environment="env"/>
  <property name="jwsdp.home" value="${env.JWSDP_HOME}"/>

That will be set in the top of your ant build.xml (or build file).

Comments

Popular posts from this blog

Converting sectors into MB - Useful in understanding the sectors in iostat in Linux

What is Disk Contention?

Installing MySQL from source: Could NOT find Curses (missing: CURSES_LIBRARY CURSES_INCLUDE_PATH)