Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/maven/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Eclipse 使用cxf codegen插件生成失败_Eclipse_Maven_Dependencies - Fatal编程技术网

Eclipse 使用cxf codegen插件生成失败

Eclipse 使用cxf codegen插件生成失败,eclipse,maven,dependencies,Eclipse,Maven,Dependencies,我将一个带有模块的现有项目导入到eclipse中,这是由第三方创建的现有代码,我需要尝试并理解这些代码。但有一个项目在mvn clean install上失败,并且以下错误不断发生;这似乎与Web服务问题有关: ERROR] Failed to execute goal org.apache.cxf:cxf-codegen- plugin:2.7.6:wsdl2java (xxxxxxxxxx) on project xxxxxxxxxx: com/sun/tools/xjc/Bad

我将一个带有模块的现有项目导入到eclipse中,这是由第三方创建的现有代码,我需要尝试并理解这些代码。但有一个项目在mvn clean install上失败,并且以下错误不断发生;这似乎与Web服务问题有关:

 ERROR] Failed to execute goal org.apache.cxf:cxf-codegen-
 plugin:2.7.6:wsdl2java (xxxxxxxxxx) on project 
 xxxxxxxxxx: 
 com/sun/tools/xjc/BadCommandLineException: 
  com.sun.tools.xjc.BadCommandLineException -> [Help 1]
这是一个使用Web服务验证凭据的用户安全项目。

如果您为Maven和“打印异常堆栈跟踪”激活“调试”模式,并且错误是BadCommandLineException的NoClassDefFoundError,那么我通过提供对cxf codegen插件的依赖性来解决它:

<plugin>
    <groupId>org.apache.cxf</groupId>
    <artifactId>cxf-codegen-plugin</artifactId>
    <version>${cxf.version}</version>
    <executions>
        <execution>
            ...
        </execution>
    </executions>

    <dependencies>
        <dependency>
            <groupId>com.sun.xml.bind</groupId>
            <artifactId>jaxb-xjc</artifactId>
            <version>2.4.0-b180725.0644</version>
        </dependency>
    </dependencies>
</plugin>

org.apache.cxf
cxf-codegen插件
${cxf.version}
...
com.sun.xml.bind
jaxbxjc
2.4.0-b180725.0644