请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

使用mybatis-generator报错

generator报错,

D:\TTS9\tts9\jdk1.8.0_45\bin\java.exe -Dmaven.multiModuleProjectDirectory=D:\App\mmall_new\zlmmall -Dmaven.home=D:\App\apache-maven-3.5.4 -Dclassworlds.conf=D:\App\apache-maven-3.5.4\bin\m2.conf "-javaagent:D:\JetBrains\IntelliJ IDEA 2019.1.3\lib\idea_rt.jar=55534:D:\JetBrains\IntelliJ IDEA 2019.1.3\bin" -Dfile.encoding=UTF-8 -classpath D:\App\apache-maven-3.5.4\boot\plexus-classworlds-2.5.2.jar org.codehaus.classworlds.Launcher -Didea.version2019.1.3 org.mybatis.generator:mybatis-generator-maven-plugin:1.3.7:generate
[WARNING] 
[WARNING] Some problems were encountered while building the effective settings
[WARNING] Unrecognised tag: 'profile' (position: START_TAG seen ...</mirrors>\r\n<profile>... @32:10)  @ D:\App\apache-maven-3.5.4\conf\settings.xml, line 32, column 10
[WARNING] 
[INFO] Scanning for projects...
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for com:zlmmall:war:1.0-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 272, column 21
[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] ----------------------------< com:zlmmall >-----------------------------
[INFO] Building zlmmall Maven Webapp 1.0-SNAPSHOT
[INFO] --------------------------------[ war ]---------------------------------
[INFO] 
[INFO] --- mybatis-generator-maven-plugin:1.3.7:generate (default-cli) @ zlmmall ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.936 s
[INFO] Finished at: 2019-06-17T23:21:46+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.7:generate (default-cli) on project zlmmall: Execution default-cli of goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.7:generate failed: Cannot resolve classpath entry: C:\Users\Administrator\.m2
[ERROR] epository\mysql\mysql-connector-java\5.1.6\mysql-connector-java-5.1.6.jar -> [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/PluginExecutionException

Process finished with exit code 1

数据库连接的本地:

db.driverLocation=C:\\Users\\Administrator\\.m2\repository\\mysql\\mysql-connector-java\\5.1.6\\mysql-connector-java-5.1.6.jar
db.driverClassName=com.mysql.jdbc.Driver

db.url=jdbc:mysql://localhost:3306/mmall?characterEncoding=utf-8

jar包也有,找不到原因

正在回答 回答被采纳积分+3

1回答

提问者 None_null 2019-06-17 23:39:14

已解决,

db.driverLocation=C:\\Users\\Administrator\\.m2\repository\\mysql\\mysql-connector-java\\5.1.6\\mysql-connector-java-5.1.6.jar

本地仓库需要写成:

db.driverLocation=C:/Users/Administrator/.m2/repository/mysql/mysql-connector-java/5.1.6/mysql-connector-java-5.1.6.jar


0 回复 有任何疑惑可以回复我~
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信