You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Knut Aksnes-NOR <Kn...@jeppesen.com> on 2011/11/17 15:21:44 UTC
Maven EJB plugin question
Maven ejb plugin have a generateClient config parameter, my question is really what will be generated, or to be specific: What will be generated for a Stateless session bean annotated as web service?
I have tried it for a simple web service (simple argument and return types) Using a dependency to the ejb-client target in a separate integration test project using the failsafe plugin. This works, but this could very well be due to pure luck.
I can bind to one of the classes from this client lib using something like:
Bar foo = Service.create(new URL("..."),
new QName("...", "Bar"))
.getPort(Bar.class);
The tests runs ok from the command line but fails when run via the Junit test runner in Eclipse 3.7 the failure is java.lang.NoClassDefFound on the Bar class.
When creating the web service ref locally in this subproject using the wsimport goal of jaxws-maven-plugin the tests works in both situations. The disadvantage of the last solution is that the web service needs to be running before being able to build the tests(The WSDL spec. needs to be available to build the tests). This creates problems using a subproject setup for the build.
The problem I have can have lots of different sources:
1. It can be maven-ejb-plugin related if it doesn't support web service annotations well.
2. It could be an m2e problem. (If it doesn't handle ejb-client correct in its dependency tracking.)
3. It could be eclipse related. (ClassPath or ClassLoader problems related to the JUnit test runner.)
At the time being I tend to suspect a m2e problem but I don't know how to fully inspect the classloader/classpath setup seen by the Eclipse JUnit test runner.