| Summary: | [mojo] org.apache.cxf:cxf-codegen-plugin support | ||||||
|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Mike Pettypiece <mike> | ||||
| Component: | m2e | Assignee: | Project Inbox <m2e.core-inbox> | ||||
| Status: | CLOSED NOT_ECLIPSE | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | awathne, Brandon.Richins, f.modler, holger, igor, jason, mail, scohen, sslavic, stain | ||||
| Version: | unspecified | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Windows 7 | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Mike Pettypiece
Created attachment 198422 [details]
Example project
I am having the same problem. Manual workaround so far: - Right-click project (or project parent) and choose Run as -> Maven generate-sources - Right-click target/generated-sources/cxf and choose Build Path -> Use as source folder, for every cxf project - Right-click project(s) and choose Maven -> Disable Maven Nature (to avoid warnings that projects and poms are not synchronized) m2e core development team is looking for help implementing support for various "not covered" maven plugins. If you are interested, wiki [1] provides pointers where to start and we'll be happy to answer questions on m2e-dev mailing list. To avoid duplicate effort, please assign this bugzilla item to yourself if you already work on corresponding m2e extension. [1] m2e extension development is documented in http://wiki.eclipse.org/M2E_Extension_Development I'm going to take a stab at this - the code will be in https://github.com/mtpettyp/m2eclipse-extras (In reply to comment #4) > I'm going to take a stab at this - the code will be in > https://github.com/mtpettyp/m2eclipse-extras Any news on that? Is there already some p2-site providing that new connector? I did some work on cxf-codegen connector(see here https://github.com/sslavic/m2e-cxf-codegen-connector ). Jaxb2 connector found here https://github.com/bitstrings/m2e-jaxb2-connector has been used as basis for project structure and ideas. Now I'm stuck, have to implement tests but would like to try connector also on local eclipse installation first. Not sure how to do the publishing part as well. So if anyone has some experience with this to continue the work, EPL 1.0 is the license. I have started integrating this on a branch here: https://github.com/sonatype/m2eclipse-extras/tree/cxf My friend Dan Diephouse who is a CXF committer was having problems so I took a look at the contributed code and started cleaning it up. I'll test it with Dan and if he thinks CXF behavior is correct inside M2E we'll publish it to the marketplace. Jason, this sounds very promising. Any news on this integration..? As reference for new readers - here is my workaround using the buildhelper connector, modified from http://stackoverflow.com/questions/6691723/m2e-generated-code-with-exec-maven-plugin <properties> <cxf.version>2.5.2</cxf.version> </properties> <build> <plugins> <plugin> <groupId>org.apache.cxf</groupId> <artifactId>cxf-codegen-plugin</artifactId> <version>${cxf.version}</version> <executions> <execution> <id>generate-sources</id> <phase>generate-sources</phase> <configuration> <!-- default: <sourceRoot>${project.build.directory}/generated-sources/cxf/</sourceRoot> --> <wsdlOptions> <wsdlOption> <wsdl>http://www.ivoa.net/wsdl/RegistrySearch/v1.0</wsdl> <extraargs> <extraarg>-client</extraarg> <extraarg>-catalog</extraarg> <extraarg>${basedir}/src/main/resources/META-INF/jax-ws-catalog.xml</extraarg> </extraargs> </wsdlOption> </wsdlOptions> </configuration> <goals> <goal>wsdl2java</goal> </goals> </execution> </executions> </plugin> <plugin> <!-- So that Eclipse m2e (with the buildhelper m2e connector) can find the generated sources --> <groupId>org.codehaus.mojo</groupId> <artifactId>build-helper-maven-plugin</artifactId> <version>1.7</version> <executions> <execution> <id>add-source</id> <phase>generate-sources</phase> <goals> <goal>add-source</goal> </goals> <configuration> <sources> <source>${project.build.directory}/generated-sources/cxf/</source> </sources> </configuration> </execution> </executions> </plugin> </plugins> <pluginManagement> <plugins> <!-- So that cxf codegen is done by m2e --> <plugin> <groupId>org.eclipse.m2e</groupId> <artifactId>lifecycle-mapping</artifactId> <version>1.0.0</version> <configuration> <lifecycleMappingMetadata> <pluginExecutions> <pluginExecution> <pluginExecutionFilter> <groupId>org.apache.cxf</groupId> <artifactId>cxf-codegen-plugin</artifactId> <versionRange>[${cxf.version},)</versionRange> <goals> <goal>wsdl2java</goal> </goals> </pluginExecutionFilter> <action> <execute> <!-- but not on every save! --> <runOnIncremental>false</runOnIncremental> </execute> </action> </pluginExecution> </pluginExecutions> </lifecycleMappingMetadata> </configuration> </plugin> </plugins> </pluginManagement> </build> I've created request on CXF JIRA (see [1]) to add lifecycle mappings in the cxf-codegen-plugin itself. This would require m2e 1.1 but I believe it is better approach than having connectors built outside of cxf project, assuming that lifecycle mapping API would change less frequently than cxf-codegen-plugin and cxf. [1]: https://issues.apache.org/jira/browse/CXF-4152 Just received a notification: The CXF JIRA issue has now been marked as resoved - fixed. https://issues.apache.org/jira/browse/CXF-4152 closing as per last comment |