Skip to main content

wsimport optimization: Maven build can be made faster without wsimport at build time ?

No replies
manojbmsce1
Offline
Joined: 2013-02-04
Points: 0

Hi,
I have built a client for calling a webservice. I use the jaxws-maven-plugin to generate the client stubs.
I am able to do a jenkins build and run the client to invoke the web service successfully.

1) Is it possible that
a) I use wsimport and generate the stubs (by running a mvn command manually on my local machine)
b) It generates the source files that I manually checkin into my SVN.
c) When jenkins/hudson does a build, it does not call wsimport goal.
(This will help in having a shorter build time)
2) Is it a good approach ? Do you see any major drawbacks with using this approach?

i.e. the build process is a bit slow because the source stubs are generated during the build time.
Imagine if there are 15 such modules that are to be built in my multi-module project.
Also, it reduces the chances of having permgen (out of memory ) issue.

Any help in this regard is highly appreciated.

Attached is the relevant part of my pom.xml, just for reference

                               <groupId>org.jvnet.jax-ws-commons</groupId>
<artifactId>jaxws-maven-plugin</artifactId>
<version>${iportal.jaxws-maven-plugin.version}</version>
<executions>
<execution>
<id>generate-sources-stub</id>
<phase>generate-sources</phase>
<goals>
<goal>wsimport</goal>
</goals>
</execution>
</executions>
<configuration>
<bindingDirectory>src/main/resources</bindingDirectory>
<bindingFiles>
                        <bindingFile>MyBindingfile.xml</bindingFile>
                    </bindingFiles>
<verbose>true</verbose>
<wsdlDirectory>src/main/resources</wsdlDirectory>
<wsdlLocation>Mywsdl.wsdl</wsdlLocation>
<packageName>com.manoj.webservice.stubs</packageName>
</configuration>