点击mybatis-generator:generate报这个错怎么解决啊

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

慕粉3226958

2020-05-21

“D:\Program Files\Java\jdk1.8.0_191\bin\java.exe” “-Dmaven.home=D:\Program Files\Apache\apache-maven-3.0.5” “-Dclassworlds.conf=D:\Program Files\Apache\apache-maven-3.0.5\bin\m2.conf” “-javaagent:D:\Program Files\JetBrains\IntelliJ IDEA 2018.2.6\lib\idea_rt.jar=62870:D:\Program Files\JetBrains\IntelliJ IDEA 2018.2.6\bin” -Dfile.encoding=UTF-8 -classpath “D:\Program Files\Apache\apache-maven-3.0.5\boot\plexus-classworlds-2.4.jar” org.codehaus.classworlds.Launcher -Didea.version=2018.2.7 -s C:\Users\user.m2\settings.xml “-Dmaven.repo.local=D:\Program Files\Apache\repository” org.mybatis.generator:mybatis-generator-maven-plugin:1.3.2:generate
[INFO] Scanning for projects…
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com:mmall:war:1.0-SNAPSHOT
[WARNING] ‘build.plugins.plugin.version’ for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 267, column 15
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building mmall Maven Webapp 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] — mybatis-generator-maven-plugin:1.3.2:generate (default-cli) @ mmall —
[INFO] Connecting to the Database
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.855s
[INFO] Finished at: Thu May 21 10:34:53 CST 2020
[INFO] Final Memory: 6M/123M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.2:generate (default-cli) on project mmall: Communications link failure
[ERROR]
[ERROR] Last packet sent to the server was 0 ms ago.
[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/MojoExecutionException

Process finished with exit code 1

写回答

1回答

geelylucky

2020-05-21

同学,报错:Communications link failure,应该是链接数据库失败了,检查一下配置文件中的数据库用户名和密码是否正确。

0
0

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

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

9476 学习 · 8804 问题

查看课程