【问题标题】:org.jibx: maven-jibx-plugin:1.2.1 - Error reading pathorg.jibx: maven-jibx-plugin:1.2.1 - 读取路径错误
【发布时间】:2015-05-26 14:44:24
【问题描述】:

我正在尝试使用 maven-jibx-plugin 版本 1.2.1 执行目标,但出现以下错误:

[ERROR] Failed to execute goal org.jibx:maven-jibx-plugin:1.2.1:bind (default) on project XoXcertExIm: Error loading class java.lang.CharSequence: Error reading

类 java.lang.CharSequence 的路径 java/lang/CharSequence.class -> [帮助 1]

我使用 Maven 3.2.5、Java 版本 1.8.0_11 和 windows 7 作为操作系统。

【问题讨论】:

    标签: apache maven plugins bind jibx


    【解决方案1】:

    Jibx 存在支持 Java 8 的问题,请参阅 Issue here comment 中有一个解决方法,您可以尝试一下。

    【讨论】:

    • 我更改了插件和存储库配置,问题已解决,感谢您的帮助!
    • @amdalal 链接已损坏。最好提取相关部分并将其包含在您的答案中。
    • 这应该在 jibx-maven-plugin 版本 1.3.1 中修复:github.com/jibx/jibx/issues/3
    【解决方案2】:

    我遇到了同样的问题...

    解决方法就像在插件“maven-jibx-plugin”中包含更新的“bcel”依赖项一样简单:

    <plugin>
        <groupId>org.jibx</groupId>
        <artifactId>jibx-maven-plugin</artifactId>
        <version>1.2.6</version>
        <dependencies>
            <!-- Workaround to avoid error compiling with JDK 1.8 -->
            <dependency>
                <groupId>org.apache.bcel</groupId>
                <artifactId>bcel</artifactId>
                <version>6.0-SNAPSHOT</version>
            </dependency>
        </dependencies>
    </plugin>
    

    您应该在“settings.xml”中包含一个新的 Maven 存储库定义以获取新的依赖项:

    <repository>
        <id>apache-snapshots-repo</id>
        <url>https://repository.apache.org/content/repositories/snapshots</url>
        <releases><enabled>false</enabled></releases>
        <snapshots><enabled>true</enabled></snapshots>
    </repository>
    

    问候

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-09-07
      • 2014-03-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多