在Jibx插件使用maven插件增强class文件时出现如下错误:
WARNING] Using platform encoding (GBK actually) to copy filtered resources, i.e. build is platform dependent! [INFO] Copying 1 resource [INFO] Copying 1 resource to JiBX [INFO] [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ NettyLearn --- [INFO] Nothing to compile - all classes are up to date [INFO] [INFO] --- jibx-maven-plugin:1.2.3:bind (compile-binding) @ NettyLearn --- [INFO] Running JiBX binding compiler (single-module mode) on 1 binding file(s) [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 03:48 min [INFO] Finished at: 2019-04-13T22:00:52+08:00 [INFO] Final Memory: 23M/176M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.jibx:jibx-maven-plugin:1.2.3:bind (compile-binding) on project NettyLearn: Error loading class java.lang.CharSequence: Error reading path java/lang/CharSequence.class for class java.lang.CharSequence -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
环境:maven版本是3.3.x,jdk8,使用的插件版本是1.2.6
原因是插件版本太低,不支持jdk8,替换插件版本为1.3.1即可