users@jax-ws-commons.java.net

JAX-WS Maven plugin wsimport issue

From: Ioannis Mavroukakis <imavroukakis_at_gameaccount.com>
Date: Tue, 28 Jul 2009 14:16:29 +0100

Hello,

I'm trying to use wsimport goal in the Maven plugin to generate source
from wsdl files without success. My pom at the moment looks like this

<plugin>
                                 <groupId>org.codehaus.mojo</groupId>
                                 <artifactId>jaxws-maven-plugin</
artifactId>
                                 <version>1.12</version>
                                 <extensions>false</extensions>
                                 <executions>
                                         <execution>
                                                 <goals>
                                                          
<goal>wsimport</goal>
                                                 </goals>
                                         </execution>
                                 </executions>
                                 <configuration>
                                         <wsdlDirectory>${basedir}/src/
wsdl</wsdlDirectory>
                                         <wsdlFiles>
                                                 <wsdlFile>Conto.wsdl</
wsdlFile>
                                                  
<wsdlFile>Contratto.wsdl</wsdlFile>
                                                  
<wsdlFile>wallet.wsdl</wsdlFile>
                                         </wsdlFiles>
                                          
<packageName>com.ga.partner.ws</packageName>
                                         <verbose>true</verbose>
                                         <sourceDestDir>$
{project.build.directory}/jaxws/wsimport/src/main/java</sourceDestDir>
                                 </configuration>
                         </plugin>

The dependencies are

         <dependency>
                         <groupId>com.sun.xml.ws</groupId>
                         <artifactId>jaxws-rt</artifactId>
                         <version>2.1.7</version>
                 </dependency>
                 <dependency>
                         <groupId>com.sun.xml.ws</groupId>
                         <artifactId>jaxws-tools</artifactId>
                         <version>2.1.7</version>
                 </dependency>

I've tried all sorts of combinations of parameters to make this work
with no joy. Running wsimport standalone works fine. The error output
from maven is

INFO] Error executing: wsimport [-s, /Development/ga4Partner/target/
jaxws/wsimport/src/main/java, -d, /Development/ga4Partner/target/
classes, -verbose, -p, com.ga.partner.ws, -Xnocompile, /Development/
ga4Partner/src/wsdl/Conto.wsdl]
[INFO]
------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Error
executing: wsimport [-s, /Development/ga4Partner/target/jaxws/wsimport/
src/main/java, -d, /Development/ga4Partner/target/classes, -verbose, -
p, com.ga.partner.ws, -Xnocompile, /Development/ga4Partner/src/wsdl/
Conto.wsdl]
         at
org
.apache
.maven
.lifecycle
.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:
703)
         at
org
.apache
.maven
.lifecycle
.DefaultLifecycleExecutor
.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:540)
         at
org
.apache
.maven
.lifecycle
.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:519)
         at
org
.apache
.maven
.lifecycle
.DefaultLifecycleExecutor
.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:371)
         at
org
.apache
.maven
.lifecycle
.DefaultLifecycleExecutor
.executeTaskSegments(DefaultLifecycleExecutor.java:332)
         at
org
.apache
.maven
.lifecycle
.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:181)
         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:
356)
         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:137)
         at org.apache.maven.cli.MavenCli.main(MavenCli.java:356)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at
sun
.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
         at
sun
.reflect
.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at
org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
         at
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: Error
executing: wsimport [-s, /Development/ga4Partner/target/jaxws/wsimport/
src/main/java, -d, /Development/ga4Partner/target/classes, -verbose, -
p, com.ga.partner.ws, -Xnocompile, /Development/ga4Partner/src/wsdl/
Conto.wsdl]
         at
org.codehaus.mojo.jaxws.WsImportMojo.wsImport(WsImportMojo.java:294)
         at
org
.codehaus
.mojo.jaxws.WsImportMojo.processLocalWsdlFiles(WsImportMojo.java:246)
         at
org.codehaus.mojo.jaxws.WsImportMojo.execute(WsImportMojo.java:206)
         at
org
.apache
.maven
.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:483)
         at
org
.apache
.maven
.lifecycle
.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:
678)

I've tried this with maven 2.2 and 2.1.


Your help is greatly appreciated!