In Netbeans, how do I avoid wsimport rebuilding web service clients every build?
Posted
by gustafc
on Stack Overflow
See other posts from Stack Overflow
or by gustafc
Published on 2010-06-11T07:53:37Z
Indexed on
2010/06/11
8:13 UTC
Read the original article
Hit count: 382
I'm on a project where we use NetBeans (6.8). We use several different web services, which we have added as web service references, and Netbeans auto-generates the Ant wsimport
scripts for us. Very handy, with one drawback: The web service clients are recompiled every time ant
is invoked. This slows down the build process considerably and has caused the number of sword-related injuries, maimings and deaths to skyrocket.
Normally, I'd fix this by changing the wsimport
element from
<wsimport
sourcedestdir="${build.generated.dir}/jax-wsCache/PonyService"
destdir="${build.generated.dir}/jax-wsCache/PonyService"
wsdl="${wsdl-PonyService}"
catalog="catalog.xml"
verbose="true"/>
to
<wsimport
sourcedestdir="${build.generated.dir}/jax-wsCache/PonyService"
destdir="${build.generated.dir}/jax-wsCache/PonyService"
wsdl="${wsdl-PonyService}"
catalog="catalog.xml"
verbose="true">
<produces dir="${build.generated.dir}/jax-wsCache/PonyService" />
</wsimport>
But I can't, 'cause this part of the Ant script is auto-generated. If I right-click the PonyService
web service reference and select Edit Web Service Attributes ⇒ wsimport
options, I can add attributes to the wsimport
element, but not child elements.
So: How do I add the produces
child element to wsimport
other than hacking the auto-generated Ant script?
Or more generally: How do I make the NetBeans-generated wsimport
not recompile the web service clients every time I build?
© Stack Overflow or respective owner