org.mybatis.generator版本不对应错误

来源:互联网 发布:ubuntu usr空间不足 编辑:程序博客网 时间:2024/04/27 21:23

错误代码

[ERROR] Failed to execute goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.2:generate (default-cli) on project unkown: http://www.mybatis.org/dtd/mybatis-generator-config_3_0.dtd -> [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

maven代码

      <plugin>                <groupId>org.mybatis.generator</groupId>                <artifactId>mybatis-generator-maven-plugin</artifactId>                <version>1.3.2</version>                <configuration>                    <verbose>true</verbose>                    <overwrite>true</overwrite>                </configuration>            </plugin>

generatorConfig.xml代码

<?xml version="1.0" encoding="UTF-8" ?>  <!DOCTYPE generatorConfiguration PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 3.0//EN" "http://mybatis.org/dtd/mybatis-generator-config_3_0.dtd">

解决方法:

generatorConfig.xml中的

       ```       <!DOCTYPE generatorConfiguration PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 3.0//EN" "http://mybatis.org/dtd/mybatis-generator-config_3_0.dtd">       ```

与maven中的

<artifactId>mybatis-generator-maven-plugin</artifactId>                <version>1.3.2</version>

版本不符合,将两处是使用为同一版本即可解决错误!

0 0
原创粉丝点击