Could not find goal ‘generator‘ in plugin org.mybatis.generator

2023-12-14 16:20:35

官方文档参考:

MyBatis Generator Core – Running MyBatis Generator With Maven

mysql 中数据表创建后,使用BGM 逆向生成mybatis 相关文件

执行命令:
mvn mybatis-generator:generator

如果报错如下:
[ERROR] Could not find goal 'generator' in plugin org.mybatis.generator:mybatis-generator-maven-plugin:1.3.7 among available goals generate, help -> [Help 1]


需要更换如下命令 
项目下执行:
mvn -Dmybatis.generator.overwrite=true mybatis-generator:generate

过程log:
...
[INFO] Generating Example class for table tfts_tcdb_nre
[INFO] Generating Record class for table tfts_tcdb_nre
[INFO] Generating Mapper Interface for table tfts_tcdb_nre
[INFO] Generating SQL Map for table tfts_tcdb_nre
...
[INFO] Saving file TftsTcdbNreMapper.xml  // 生成于 ~/src/resource/.../mapper
....
[INFO] Saving file TftsTcdbNreExample.java  // 生成于 ~/src/main/.../po
[INFO] Saving file TftsTcdbNre.java  // 生成于 ~/src/main/.../po
[INFO] Saving file TftsTcdbNreMapper.java  // 生成于 ~/src/main/.../mapper
.....

文章来源:https://blog.csdn.net/weixin_41693437/article/details/134994809
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。