mybatis逆向生成代碼 [ERROR] No plugin found for prefix 'mybatis-generator' in the current project and in the plugin groups


前言

down了一個項目mybatis逆向生成代碼時出現如下錯誤

[ERROR] No plugin found for prefix 'mybatis-generator' in the current project and in the plugin groups [com.bkjf.commons.plugins, org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (F:\maven-repository), nexus (http://nexus.ehomepay.com.cn/nexus/content/groups/public)] -> [Help 1]
org.apache.maven.plugin.prefix.NoPluginFoundForPrefixException: No plugin found for prefix 'mybatis-generator' in the current project and in the plugin groups [com.bkjf.commons.plugins, org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (F:\maven-repository), nexus (http://nexus.ehomepay.com.cn/nexus/content/groups/public)]

解決步驟

1. 引入依賴

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

 

2.引入mybatis-generator插件

<plugin>
    <groupId>org.mybatis.generator</groupId>
    <artifactId>mybatis-generator-maven-plugin</artifactId>
    <version>1.3.5</version>
    <configuration>
        <verbose>true</verbose>
        <overwrite>true</overwrite>
        <configurationFile>${basedir}/src/main/resources/mybatis-generatorConfig.xml</configurationFile>
    </configuration>
</plugin>

 

另: mybatis-generator:generate -e 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM