为了账号安全,请及时绑定邮箱和手机立即绑定

运行mybatis-generator出错

/Library/Java/JavaVirtualMachines/jdk1.8.0_201.jdk/Contents/Home/bin/java "-Dmaven.multiModuleProjectDirectory=/Users/wd/Desktop/intershipmanagementsystem-main 2/code/miaosha" -Dmaven.home=/Users/wd/Desktop/apache-maven-3.6.3 -Dclassworlds.conf=/Users/wd/Desktop/apache-maven-3.6.3/bin/m2.conf "-Dmaven.ext.class.path=/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven-event-listener.jar" "-javaagent:/Applications/IntelliJ IDEA.app/Contents/lib/idea_rt.jar=51446:/Applications/IntelliJ IDEA.app/Contents/bin" -Dfile.encoding=UTF-8 -classpath /Users/wd/Desktop/apache-maven-3.6.3/boot/plexus-classworlds.license:/Users/wd/Desktop/apache-maven-3.6.3/boot/plexus-classworlds-2.6.0.jar org.codehaus.classworlds.Launcher -Didea.version=2020.2.3 -s /Users/wd/Desktop/apache-maven-3.6.3/conf/settings.xml mybatis-generator:generate

[INFO] Scanning for projects...

[INFO] 

[INFO] ------------------------< org.example:miaosha >-------------------------

[INFO] Building miaosha 1.0-SNAPSHOT

[INFO] --------------------------------[ jar ]---------------------------------

[INFO] 

[INFO] --- mybatis-generator-maven-plugin:1.3.5:generate (default-cli) @ miaosha ---

[INFO] ------------------------------------------------------------------------

[INFO] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Total time:  0.585 s

[INFO] Finished at: 2020-11-29T01:31:57+08:00

[INFO] ------------------------------------------------------------------------

[ERROR] Failed to execute goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.5:generate (default-cli) on project miaosha: Execution default-cli of goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.5:generate failed: An API incompatibility was encountered while executing org.mybatis.generator:mybatis-generator-maven-plugin:1.3.5:generate: java.lang.NoSuchMethodError: org.mybatis.generator.internal.util.ClassloaderUtility.getCustomClassloader(Ljava/util/List;)Ljava/lang/ClassLoader;

[ERROR] -----------------------------------------------------

[ERROR] realm =    plugin>org.mybatis.generator:mybatis-generator-maven-plugin:1.3.5

[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy

[ERROR] urls[0] = file:/Users/wd/.m2/repository/org/mybatis/generator/mybatis-generator-maven-plugin/1.3.5/mybatis-generator-maven-plugin-1.3.5.jar

[ERROR] urls[1] = file:/Users/wd/.m2/repository/org/mybatis/generator/mybatis-generator-core/1.4.0/mybatis-generator-core-1.4.0.jar

[ERROR] urls[2] = file:/Users/wd/.m2/repository/mysql/mysql-connector-java/8.0.21/mysql-connector-java-8.0.21.jar

[ERROR] urls[3] = file:/Users/wd/.m2/repository/com/google/protobuf/protobuf-java/3.11.4/protobuf-java-3.11.4.jar

[ERROR] urls[4] = file:/Users/wd/.m2/repository/org/codehaus/plexus/plexus-utils/3.0.22/plexus-utils-3.0.22.jar

[ERROR] urls[5] = file:/Users/wd/.m2/repository/org/apache/commons/commons-lang3/3.4/commons-lang3-3.4.jar

[ERROR] urls[6] = file:/Users/wd/.m2/repository/javax/enterprise/cdi-api/1.0/cdi-api-1.0.jar

[ERROR] urls[7] = file:/Users/wd/.m2/repository/org/eclipse/sisu/org.eclipse.sisu.inject/0.3.2/org.eclipse.sisu.inject-0.3.2.jar

[ERROR] urls[8] = file:/Users/wd/.m2/repository/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar

[ERROR] Number of foreign imports: 1

[ERROR] import: Entry[import  from realm ClassRealm[maven.api, parent: null]]

[ERROR] 

[ERROR] -----------------------------------------------------

[ERROR] 

[ERROR] -> [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/PluginContainerException


正在回答

2 回答

mybatis-core版本要和mybatis-maven-plugin版本要一致

0 回复 有任何疑惑可以回复我~

知道了,mybatis-core版本要和mybatis-maven-plugin版本要一致

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消
SpringBoot构建电商基础秒杀项目
  • 参与学习       48641    人
  • 解答问题       950    个

应用SpringBoot快速搭建拥有用户、商品、交易及秒杀活动的电商秒杀应用。

进入课程

运行mybatis-generator出错

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信