maven中mybatis-generator生成错误

来源:5-10 mybatis三剑客之mybatis-generator生成数据对象和时间戳优化

YangyuChen

2020-07-12

一开始是报了如下错误:
[ERROR] Failed to execute goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.2:generate (default-cli)
on project mmall: Execution default-cli of goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.2:generate
failed: Plugin org.mybatis.generator:mybatis-generator-maven-plugin:1.3.2 or one of
its dependencies could not be resolved: The repository system is offline but the artifact
org.codehaus.plexus:plexus-utils:jar:1.1 is not available in the local repository.
手动添加org.codehaus.plexus:plexus-utils:jar:1.1到仓库后。
执行mybatis-generator后,又报了如下错误:
[ERROR] Failed to execute goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.2:
generate (default-cli) on project mmall: Execution default-cli of goal org.mybatis.generator:
mybatis-generator-maven-plugin:1.3.2:generate failed: A required class was missing
while executing org.mybatis.generator:mybatis-generator-maven-plugin:1.3.2:generate:
org/mybatis/generator/exception/InvalidConfigurationException
找了许多方法,都不行,特来提问

写回答

1回答

geelylucky

2020-07-13

同学,你配置了阿里云的镜像源嘛?https://www.cnblogs.com/jichi/p/11621412.html

配置好后重新refresh一下maven

0
1
YangyuChen
这个之前配过了。 不过我把配置改为 org.mybatis.generator mybatis-generator-maven-plugin 1.3.5 src/main/resources/generatorConfig.xml false true mysql mysql-connector-java 5.1.41 就成功了
2020-07-13
共1条回复

从0开始 独立完成企业级Java电商网站服务端开发

前后端分离,数据库接口设计,架构设计,功能开发,上线运维

9476 学习 · 8804 问题

查看课程