mvn mybatis-generator:generate -e
mvn项目执行generator生成代码的时候,报了异常:No plugin found for prefix 'mybatis-generator' in the current project and in the plugin groups ...
[ERROR] No plugin found for prefix 'mybatis-generator' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (/Users/xxx/repository), alimaven (http://maven.aliyun.com/nexus/content/repositories/central/)] -> [Help 1]
org.apache.maven.plugin.prefix.NoPluginFoundForPrefixException: No plugin found for prefix 'mybatis-generator' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (/Users/xxx/repository), alimaven (http://maven.aliyun.com/nexus/content/repositories/central/)]
at org.apache.maven.plugin.prefix.internal.DefaultPluginPrefixResolver.resolve (DefaultPluginPrefixResolver.java:95)
at org.apache.maven.lifecycle.internal.Mo
网上说的都是配置问题,我这个原因是我的generator是在单一模块的pom里引用的,所以得在命令行进入到当前模块,然后执行生成代码的命令:
cd 模块名
mvn mybatis-generator:generate -e