Publishing wsdl java M2E plugin execution not covered

百般思念 提交于 2019-11-30 14:35:16
Jörn Horstmann

The error message sounds like it is coming from the maven eclipse integration (m2e). If the build works from the command line but not from within eclipse then maybe this article on the eclipse wiki can help you to configure eclipse.

This answer shows the solution for a similar problem with another maven plugin.

You can add this snippet to your pom.xml (from the link published by @Jörn Horstmann):

<pluginManagement>
            <plugins>
                <!--This plugin's configuration is used to store Eclipse m2e settings 
                    only. It has no influence on the Maven build itself. -->
                <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>[2.3.3,)</versionRange>
                                        <goals>
                                            <goal>wsdl2java</goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        <execute />
                                    </action>
                                </pluginExecution>
                            </pluginExecutions>
                        </lifecycleMappingMetadata>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>

The more important lines are:

<groupId>org.apache.cxf</groupId>
                                        <artifactId>cxf-codegen-plugin</artifactId>
                                        <versionRange>[2.3.3,)</versionRange>
                                        <goals>
                                            <goal>wsdl2java</goal>
                                        </goals>

So, you have to ensure what version of CXF are you using... Hope this can help...

Change the plugin version to this especific. After, Run Maven Update Project, and finally Run Maven generate-sources

<groupId>org.apache.cxf</groupId>
<artifactId>cxf-codegen-plugin</artifactId>
<version>2.7.10</version>

Best regards,

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!