问答详情
源自:2-4 Mybatis自动生成器使用方式

运行mybatis-generator出错

[INFO] Scanning for projects...

[INFO] ------------------------------------------------------------------------

[INFO] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Total time:  0.404 s

[INFO] Finished at: 2020-11-01T20:51:07+08:00

[INFO] ------------------------------------------------------------------------

[ERROR] Could not find goal 'generator' in plugin org.mybatis.generator:mybatis-generator-maven-plugin:1.3.7 among available goals generate, help -> [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/MojoNotFoundException


提问者:qq_慕哥8137957 2020-11-01 20:51

个回答

  • dpq592
    2021-03-03 15:59:47

    mybatis-generator:generate

    你可能是吧最后generate也写成generator了

  • de8格
    2020-11-02 22:16:52

    在pom中需要引用

    <groupId>org.mybatis.generator</groupId>
    <artifactId>mybatis-generator-maven-plugin</artifactId>
    <version>1.3.5</version>
    <dependencies>
        <dependency>
            <groupId>org.mybatis.generator</groupId>
            <artifactId>mybatis-generator-core</artifactId>
            <version>1.3.5</version>
        </dependency>

    然后刷新maven