Con*_*dky 6 wsdl maven-2 wsdl2java
我编写了一个WSDL,我想生成java类.
我为maven2 使用cxf-codegen-plugin,但是我在Eclipse中遇到以下验证错误:
生命周期配置未涵盖插件执行:org.apache.cxf:cxf-codegen-plugin:2.2.7:wsdl2java(执行:generate-sources,phase:generate-sources).
有人可以帮我解决这个问题吗?或提出另一种解决方案
错误消息听起来像来自maven eclipse集成(m2e).如果构建是从命令行运行但不是从eclipse中运行那么也许eclipse wiki上的这篇文章可以帮助你配置eclipse.
这个答案显示了另一个maven插件的类似问题的解决方案.
您可以将此代码段添加到 pom.xml(来自 @J\xc3\xb6rn Horstmann 发布的链接):
\n\n<pluginManagement>\n <plugins>\n <!--This plugin's configuration is used to store Eclipse m2e settings \n only. It has no influence on the Maven build itself. -->\n <plugin>\n <groupId>org.eclipse.m2e</groupId>\n <artifactId>lifecycle-mapping</artifactId>\n <version>1.0.0</version>\n <configuration>\n <lifecycleMappingMetadata>\n <pluginExecutions>\n <pluginExecution>\n <pluginExecutionFilter>\n <groupId>org.apache.cxf</groupId>\n <artifactId>cxf-codegen-plugin</artifactId>\n <versionRange>[2.3.3,)</versionRange>\n <goals>\n <goal>wsdl2java</goal>\n </goals>\n </pluginExecutionFilter>\n <action>\n <execute />\n </action>\n </pluginExecution>\n </pluginExecutions>\n </lifecycleMappingMetadata>\n </configuration>\n </plugin>\n </plugins>\n </pluginManagement>\nRun Code Online (Sandbox Code Playgroud)\n\n更重要的几行是:
\n\n<groupId>org.apache.cxf</groupId>\n <artifactId>cxf-codegen-plugin</artifactId>\n <versionRange>[2.3.3,)</versionRange>\n <goals>\n <goal>wsdl2java</goal>\n </goals>\nRun Code Online (Sandbox Code Playgroud)\n\n因此,您必须确保您使用的是哪个版本的 CXF...\n希望这可以帮助...
\n| 归档时间: |
|
| 查看次数: |
13573 次 |
| 最近记录: |