Maven jaxb2:xjc/jaxws:wsimport to be added in eclipse?
I have a library I am creating based on some WSDL/XSD definitions. I am having a problem having the compiled classes added in the eclipse project. I can see that with a 'mvn compile' that the .class files are generat开发者_Python百科ed, as well as the .java files. The problem is that even though the .class files are generated, eclipse is still showing an error on the import statement "import com.whatever.SomeService_Service" that was generated by one of the plugins. I tried forcing the source to go into the project/src/main/java directory, but when the project is cleaned, it deletes files that I have created. Has anyone run into this before/found a way to get it to recognize that the class files are there? Thanks.
The convention with Maven is to generate code in target/generated-sources/<tool>
, for example target/generated-sources/jax-ws
.
Once generated, run mvn eclipse:eclipse
if you are using the maven eclipse plugin or right-click on your project and select Maven > Update Project Configuration if you are using M2Eclipse.
Knowing this is a old thread but only for reference, I resolved the problem with the following connector:
http://code.google.com/p/jaxws-maven-connector/
精彩评论