码迷,mamicode.com
首页 > 其他好文 > 详细

Failed to execute goal org.mybatis.generator:mybatis-generator-maven-plugin:generate (default-cli) on project : <properties> resource does not exist

时间:2017-09-27 11:36:31      阅读:342      评论:0      收藏:0      [点我收藏+]

标签:解决方法   project   col   main   插件   resources   自动生成   efault   pom.xml   

使用mybatis-generator自动生成mapper、dao等文件时,报错如下:

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.mybatis.generator:mybatis-generator-maven-plugin:generate (default-cli) on project ssm: <properties> resource does not exist

 

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

解决方法如下:

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

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

<dependencies>
  <!--相关的依赖文件-->
</dependencies>
<bulid>
<plugins>
  <!--相关的插件-->
</plugins>
<resources>
            <resource>
                <directory>src/main/java</directory>
                <includes>
                    <include>**/*.xml</include>
                </includes>
                <filtering>true</filtering>
            </resource>

            <resource>
                <directory>src/main/resources</directory>
                <includes>
                    <include>**/*.properties</include>
                </includes>
            </resource>
 </resources>
</build>

 

Failed to execute goal org.mybatis.generator:mybatis-generator-maven-plugin:generate (default-cli) on project : <properties> resource does not exist

标签:解决方法   project   col   main   插件   resources   自动生成   efault   pom.xml   

原文地址:http://www.cnblogs.com/expiator/p/7600559.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!