java - maven pom.xml 提示执行无法解析依赖关系但功能正常

标签 java eclipse maven pom.xml wsdl2java

我有一个使用 WSDL 服务的 Java 项目。 pom 给出了一个错误(所以我的项目上有红色 X)但是一切都正确构建和运行。我很困惑,任何想法都适用。

这是麻烦制造者:

< !-- WSDL stub generation -- >
<plugin>
    <groupId>org.apache.cxf</groupId>
    <artifactId >cxf-codegen-plugin</artifactId>
    <version>${cxf-codegen-plugin.version}</version>
    <executions>
        <execution>
            <id>generate-sources</id>
            <phase>generate-sources</phase>
            <configuration>
                <sourceRoot>${basedir}/target/generated/src/main/java</sourceRoot>
                <wsdlOptions>
                    <wsdlOption>
                        <wsdl>${basedir}/src/wsdl/Service.wsdl</wsdl>
                    </wsdlOption>
                </wsdlOptions>
            </configuration>
            <goals>
                <goal>wsdl2java</goal>
            </goals>
        </execution>
    </executions>
</plugin>

这是我从上面的执行元素得到的错误:

Execution generate-sources of goal org.apache.cxf:cxf-codegen-plugin:2.7.2:wsdl2java failed: Plugin org.apache.cxf:cxf-codegen-plugin:2.7.2 or one of its dependencies could not be resolved: Failed to collect dependencies for org.apache.cxf:cxf-codegen-plugin:jar:2.7.2 () (org.apache.cxf:cxf-codegen-plugin:2.7.2:wsdl2java:generate-sources:generate-sources)

(抱歉 '<' 和 '>' 周围的空格。我是 S.O. 的新手,还不能发布图片。

最佳答案

我相信这可能意味着 Maven 找不到依赖项,但它仍然存在于您的类路径中......它可能由 servlet 容器提供。

关于java - maven pom.xml 提示执行无法解析依赖关系但功能正常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19696559/

相关文章:

Java Scanner - 忽略后续字母

java - 如何为 Oracle Adf 应用程序模块浏览器设置 sql 驱动程序

maven - 使用 maven-assembly-plugin 生成 OSGi 包分发

java - 使用 spring 数据存储库和 mongodb 设置 spring 应用程序

java - Vaadin 谷歌描述

java - Android中PrintWriterPrinter有什么用?

eclipse - Eclipse 中的模糊自动完成

java - 如何调整关卡加载器使其适用于所有 Android 手机?

eclipse - PyDev 中经典的垂直滚动条在哪里?

java - Jenkins [错误] 此环境中未提供编译器