我的学习笔记——mybatis-generator 所遇到问题(一)

问题log:

"C:\Program Files\Java\jdk1.8.0_40\bin\java.exe" -Dmaven.multiModuleProjectDirectory=E:\demo\rja_api -Dmaven.home=D:\TOOLS\maven\apache-maven-3.5.3 -Dclassworlds.conf=D:\TOOLS\maven\apache-maven-3.5.3\bin\m2.conf "-javaagent:D:\TOOLS\idea\IntelliJ IDEA 2018.1.4\lib\idea_rt.jar=62021:D:\TOOLS\idea\IntelliJ IDEA 2018.1.4\bin" -Dfile.encoding=UTF-8 -classpath D:\TOOLS\maven\apache-maven-3.5.3\boot\plexus-classworlds-2.5.2.jar org.codehaus.classworlds.Launcher -Didea.version=2018.1.4 -s D:\TOOLS\maven\apache-maven-3.5.3\conf\settings.xml -Dmaven.repo.local=D:\TOOLS\maven\apache-maven-3.5.3\repository org.mybatis.generator:mybatis-generator-maven-plugin:1.3.2:generate -f pom.xml

[INFO] Scanning for projects...
[INFO] 
[INFO] --------------------------< com.fsd:rja_api >---------------------------
[INFO] Building rja_api 1.0-SNAPSHOT
[INFO] --------------------------------[ war ]---------------------------------
[INFO] 
[INFO] --- mybatis-generator-maven-plugin:1.3.2:generate (default-cli) @ rja_api ---
[ERROR] <properties> resource generator.properties does not exist
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.493 s
[INFO] Finished at: 2018-06-21T22:03:54+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.2:generate (default-cli) on project rja_api: <properties> resource generator.properties does not exist -> [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


原因:

错误原因是maven无法找到对应<properties> resource文件.

解决方法:

1.检查properties文件,每一行的行首和行末,是否有多余的空格,将其删掉;

2.在maven的pom.xml文件中,加入如下的<resource>配置:

如图


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值