thx for this information, i already found out where the problem was. a full description of my solution can be read here: http://www.nabble.com/-M2--jaxws-maven-plugin-vs.-ant-task-using-wsgen-tf480 5393s177.html#a13792006
best regards R.C. -----Ursprüngliche Nachricht----- Von: Farrukh Najmi [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 15. November 2007 14:23 An: [email protected] Betreff: Re: [mojo-user] [M2] jaxws-maven-plugin vs. ant-task using wsgen That list has low traffic. Perhaps the [EMAIL PROTECTED] may get better results. It has the appropriate developers monitoring the list as well. Farrukh Najmi wrote: > You should register and post to the [EMAIL PROTECTED] > for questions on jax-ws-maven-plugin. > BTW I use it for wsimport often but have never used it fro wsgen. > > Roman Cerny wrote: >> Hi There, >> >> I'm an absolute noob to webservices, who is currently trying to >> compile a webservice annotated class, with the actual >> jaxws-maven-plugin. >> >> i already lost 3 days, and still didn't find a way to get it running >> properly. >> >> to find the error i stepped back, and simply tried to get the wsgen >> example >> running: >> https://jax-ws-commons.dev.java.net/source/browse/*checkout*/jax-ws-c >> ommons/ >> >> trunk/jaxws-maven-plugin/src/it/wsgen/pom.xml?content-type=text%2Fpla >> in&rev= >> >> 110 >> >> after removing the version (which points to a SNAPSHOT which can't be >> downloaded) i have the following pom.xml: >> >> <?xml version="1.0" encoding="UTF-8" ?> >> >> <project >> xmlns="http://maven.apache.org/POM/4.0.0" >> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 >> http://maven.apache.org/maven-v4_0_0.xsd"> >> >> >> <modelVersion>4.0.0</modelVersion> >> <groupId>org.codehaus.mojo.jaxws.it</groupId> >> <artifactId>helloworldws</artifactId> >> <version>1.0-SNAPSHOT</version> >> <packaging>war</packaging> >> <name>helloworld</name> >> <dependencies> >> <dependency> >> <groupId>com.sun.xml.ws</groupId> >> <artifactId>jaxws-rt</artifactId> >> <version>2.1</version> >> </dependency> >> </dependencies> >> >> <!-- temporary only until java.net maven2 repo is ready--> >> <repositories> >> <repository> >> <id>java.net</id> >> >> <url>https://maven-repository.dev.java.net/nonav/repository/</url> >> <layout>legacy</layout> >> </repository> >> </repositories> >> >> <build> >> <finalName>${artifactId}</finalName> >> <plugins> >> <plugin> >> <groupId>org.apache.maven.plugins</groupId> >> <artifactId>maven-compiler-plugin</artifactId> >> <configuration> >> <source>1.5</source> >> <target>1.5</target> >> </configuration> >> <executions> >> <execution> >> <id>compile</id> >> <goals> >> <goal>compile</goal> >> </goals> >> <phase>initialize</phase> >> </execution> >> </executions> >> </plugin> >> <plugin> >> <groupId>org.codehaus.mojo</groupId> >> <artifactId>jaxws-maven-plugin</artifactId> >> <executions> >> <execution> >> <goals> >> <goal>wsgen</goal> >> </goals> >> <phase>generate-sources</phase> >> <configuration> >> <sei>org.codehaus.mojo.jaxws.it.HelloWorldImpl</sei> >> <genWsdl>true</genWsdl> <!-- for demo purpose only, >> the wepapp does not need those the generated wsdl files--> >> <keep>true</keep> >> </configuration> >> </execution> >> </executions> >> </plugin> >> <plugin> >> <groupId>org.mortbay.jetty</groupId> >> <artifactId>maven-jetty-plugin</artifactId> >> <version>6.0.1</version> >> <configuration> >> <scanIntervalSeconds>10</scanIntervalSeconds> >> <contextPath>/</contextPath> >> <!--jettyEnvXml>${basedir}/src/jetty-env.xml</jettyEnvXml--> >> <connectors> >> <connector >> implementation="org.mortbay.jetty.nio.SelectChannelConnector"> >> <port>9090</port> >> <maxIdleTime>60000</maxIdleTime> >> </connector> >> </connectors> >> </configuration> >> </plugin> >> </plugins> >> </build> >> </project> >> >> >> when running 'mvn install -X -e' from the command line i get the >> following >> error: >> >> [DEBUG] jaxws:wsgen args: [-keep, -d, C:\projects\jax-ws\target\classes, >> -cp, C:\projects\jax-ws\target\classes;D:\data >> Maven_repository\javax\xml\bind\jaxb-api\2.1\jaxb-api-2.1.jar;D:\data\Maven_ >> >> repository\javax\xml\ws\jaxws-api\2.1\jaxws >> api-2.1.jar;D:\data\Maven_repository\javax\xml\soap\saaj-api\1.3\saaj-api-1. >> >> 3.jar;D:\data\Maven_repository\com\sun\xml\ >> essaging\saaj\saaj-impl\1.3\saaj-impl-1.3.jar;D:\data\Maven_repository\com\s >> >> un\xml\stream\buffer\streambuffer\0.4\strea >> buffer-0.4.jar;D:\data\Maven_repository\com\sun\xml\stream\sjsxp\1.0\sjsxp-1 >> >> .0.jar;D:\data\Maven_repository\com\sun\xml >> bind\jaxb-impl\2.1.2\jaxb-impl-2.1.2.jar;D:\data\Maven_repository\com\sun\xm >> >> l\ws\jaxws-rt\2.1\jaxws-rt-2.1.jar;D:\data\ >> aven_repository\javax\xml\stream\stax-api\1.0\stax-api-1.0.jar;D:\data\Maven >> >> _repository\javax\activation\activation\1.1 >> activation-1.1.jar;D:\data\Maven_repository\org\jvnet\staxex\stax-ex\1.0\sta >> >> x-ex-1.0.jar, -wsdl, -r, C:\projects\jax-ws >> target\jaxws\wsgen\wsdl, org.codehaus.mojo.jaxws.it.HelloWorldImpl] >> [INFO] >> ------------------------------------------------------------------------ >> [ERROR] BUILD ERROR >> [INFO] >> ------------------------------------------------------------------------ >> [INFO] Failed to execute wsgen >> >> Embedded error: javax/jws/WebService >> [INFO] >> ------------------------------------------------------------------------ >> [DEBUG] Trace >> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to >> execute >> wsgen >> at >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLife >> >> cycleExecutor.java:564) >> at >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle >> >> (DefaultLifecycleExecutor.java:4 >> 0) >> at >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifec >> >> ycleExecutor.java:459) >> at >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFail >> >> ures(DefaultLifecycleExecutor.ja >> a:311) >> at >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(Defa >> >> ultLifecycleExecutor.java:278) >> at >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycle >> >> Executor.java:143) >> at >> org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334) >> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125) >> at org.apache.maven.cli.MavenCli.main(MavenCli.java:280) >> 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:585) >> 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: Failed to >> execute >> wsgen >> at >> org.codehaus.mojo.jaxws.AbstractWsGenMojo.execute(AbstractWsGenMojo.java:96) >> >> at >> org.codehaus.mojo.jaxws.MainWsGenMojo.execute(MainWsGenMojo.java:14) >> at >> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManage >> >> r.java:443) >> at >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLife >> >> cycleExecutor.java:539) >> ... 16 more >> Caused by: java.lang.NoClassDefFoundError: javax/jws/WebService >> at >> com.sun.tools.ws.wscompile.WsgenOptions.validateEndpointClass(WsgenOptions.j >> >> ava:198) >> at >> com.sun.tools.ws.wscompile.WsgenOptions.validate(WsgenOptions.java:180) >> at com.sun.tools.ws.wscompile.WsgenTool.run(WsgenTool.java:88) >> at com.sun.tools.ws.WsGen.doMain(WsGen.java:55) >> at >> org.codehaus.mojo.jaxws.AbstractWsGenMojo.execute(AbstractWsGenMojo.java:91) >> >> ... 19 more >> [INFO] >> ------------------------------------------------------------------------ >> [INFO] Total time: 2 seconds >> [INFO] Finished at: Wed Nov 14 15:26:30 CET 2007 >> [INFO] Final Memory: 6M/1016M >> [INFO] >> ------------------------------------------------------------------------ >> >> >> >> since i'm almost getting mad, i also tried to run an ant-task, using the >> maven-antrun-plugin instead of the jaxws-maven-plugin: >> >> <plugin> >> <artifactId>maven-antrun-plugin</artifactId> >> <executions> >> <execution> >> <phase>compile</phase> >> <configuration> >> <tasks> >> <exec executable="wsgen"> >> <arg value="-classpath"/> >> <arg >> value="${project.build.directory}/classes"/> >> <arg value="-d"/> >> <arg >> value="${project.build.directory}/classes"/> >> <arg value="-wsdl" /> >> <arg value="-keep" /> >> <arg >> value="org.codehaus.mojo.jaxws.it.HelloWorldImpl"/> >> </exec> >> </tasks> >> </configuration> >> <goals> >> <goal>run</goal> >> </goals> >> </execution> >> </executions> >> </plugin> >> >> but with this approach i have the problem, that it works only when >> adding >> the java6 sdk binary folder to the system path, but since i don't >> want to >> use java6, i can't use this approach either. >> >> i even tried to run wsgen from the command line by myself, which >> worked fine >> (when adding the path to java6). >> >> >> >> So PLEASE let me know if you have any ideas. >> >> Maybe one of you would be so kind, to post a FULL WORKING pom.xml using >> java5 with the jaxws-maven-plugin (or even fix the error in the example >> pom.xml). >> >> waiting for any replies that could help me out. >> >> thx @all >> R.C. >> >> >> P.S.: I know that this plugin moved from codehaus to java.net >> (glassfish), >> but i couldn't find any users forum (at java.net) so i decided to >> post it >> here. >> >> P.P.S.: also posted the same issue at the Maven-Users Forum, see: >> http://www.nabble.com/-M2--jaxws-maven-plugin-vs.-ant-task-using-wsgen-tf480 >> >> 5393s177.html#a13764781 >> >> >> >> --------------------------------------------------------------------- >> To unsubscribe from this list please visit: >> >> http://xircles.codehaus.org/manage_email >> >> > > -- Regards, Farrukh Najmi Web: http://www.wellfleetsoftware.com --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email
