No plugin found for prefix 'mybatis-generator' in the current project

http://blog.csdn.net/you23hai45/article/details/50792430

1、错误描述

 

  1. F:\workspaces\Mybatis>mvn mybatis-genertor:generate  
  2. [INFO] Scanning for projects...  
  3. Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven  
  4. -metadata.xml  
  5. Downloading: https://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metada  
  6. ta.xml  
  7. Downloaded: https://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadat  
  8. a.xml (20 KB at 3.6 KB/sec)  
  9. Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-  
  10. metadata.xml (13 KB at 2.1 KB/sec)  
  11. [INFO] ------------------------------------------------------------------------  
  12. [INFO] BUILD FAILURE  
  13. [INFO] ------------------------------------------------------------------------  
  14. [INFO] Total time: 7.671 s  
  15. [INFO] Finished at: 2016-03-03T22:58:54+08:00  
  16. [INFO] Final Memory: 11M/171M  
  17. [INFO] ------------------------------------------------------------------------  
  18. [ERROR] No plugin found for prefix 'mybatis-genertor' in the current project and  
  19.  in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available fr  
  20. om the repositories [local (C:\Users\Administrator\.m2\repository), central (htt  
  21. ps://repo.maven.apache.org/maven2)] -> [Help 1]  
  22. [ERROR]  
  23. [ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit  
  24. ch.  
  25. [ERROR] Re-run Maven using the -X switch to enable full debug logging.  
  26. [ERROR]  
  27. [ERROR] For more information about the errors and possible solutions, please rea  
  28. d the following articles:  
  29. [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/NoPluginFoundF  
  30. orPrefixException  
  31.   
  32. F:\workspaces\Mybatis>  

2、错误原因

      由错误提示可知,在当前项目中没有找到前缀为“mybatis-generator”

 

3、解决办法

(1)将Maven项目先clean,接着install下

(2)运行mvn mybatis-generator:generate命令

posted @ 2017-01-05 11:04  恒星照地球  阅读(12065)  评论(2编辑  收藏  举报