Glen,
You have to do couple things in order to run codegen:wsdl2java under the
folder which contains the pom.xml
You can take a look at the /tools/jdee which is a maven plugin i did for
generating the emacs jdee project
How it works?
0. Look at the /tools/jdee/pom.xml, the group id is
org.apache.cxf.maven, the artifact id is maven-jdee-plugin
1. mvn install (install the plugin)
2. Update the ~/.m2/settings.xml, add
<pluginGroups>
<pluginGroup>org.apache.cxf.maven</pluginGroup>
</pluginGroups>
3. cd /trunk
4. mvn jdee:jdee
The first jdee is the middle word in the artifact id, the second jdee is the
Mojo tools/jdee/src/main/java/org/apache/cxf/maven_plugin/jdee/JdeeMojo.java
See the annotation in the class, the goal is jdee
And, as you see, we have a
tools/jdee/src/main/java/org/apache/cxf/maven_plugin/jdee/CleanMojo.java
Thus you're allow to clean the emacs jdee project with the command
mvn jdee:clean
The wsdl2java Mojo is a little bit different, the groupid is org.apache.cxf,
you you have to add it into the ~/.m2/settings.xml
<pluginGroups>
<pluginGroup>org.apache.cxf</pluginGroup>
</pluginGroups>
And you have to change the artifact id of the codegen plugin from the
cxf-codegen-plugin to maven-codegen-plugin
And now, you can run
mvn codegen:wsdl2java under the /testutils but that's not working, because
wsdl2java will ask for the wsdlOption arguments etc.
The best solution i have is to modify the wsdl2java plugin using the CoC
approach, in this way you don't have to put all the wsdls in your pom
The solution is very similar to the function I added to fAnt[1]
Hope this helps :)
Regards,
James
[1]http://maomaode.bokeland.com/blog/3/9741/2007/11/15/301276
Hello,
I have another CXF/Maven[1] newbie question--to run wsdl2java using
Maven, what is the plugin prefix for wsdl2java, i.e.,
"mvn ????:wsdl2java" at the command line? Currently I'm using "mvn
generate-sources" instead which works fine, but would like to see if I
can get it to work using the actual goal name.
Thanks,
Glen
[1] http://cwiki.apache.org/confluence/display/CXF20DOC/Maven
+Integration+and+Plugin