mybatis-generator运行报错Failed to execute goal org.mybatis.generator:m...

"C:Program FilesJavajdk-9.0.4binjava.exe" -Dmaven.multiModuleProjectDirectory=E:testone "-Dmaven.home=D:IDEAIntelliJ IDEA 2018.3pluginsmavenlibmaven3" "-Dclassworlds.conf=D:IDEAIntelliJ IDEA 2018.3pluginsmavenlibmaven3binm2.conf" "-javaagent:D:IDEAIntelliJ IDEA 2018.3libidea_rt.jar=4358:D:IDEAIntelliJ IDEA 2018.3bin" -Dfile.encoding=UTF-8 -classpath "D:IDEAIntelliJ IDEA 2018.3pluginsmavenlibmaven3bootplexus-classworlds-2.5.2.jar" org.codehaus.classworlds.Launcher -Didea.version=2018.3 mybatis-generator:generate
[INFO] Scanning for projects...

[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building testone 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- mybatis-generator-maven-plugin:1.3.5:generate (default-cli) @ testone ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.881 s
[INFO] Finished at: 2019-02-10T23:37:32+08:00
[INFO] Final Memory: 17M/57M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.5:generate (default-cli) on project testone: Execution default-cli of goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.5:generate failed: Cannot resolve classpath entry: F:workspaceniuwa-p2psWebContentWEB-INFlibmysql-connector-java-5.1.25.jar -> [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/PluginExecutionException

Process finished with exit code 1

这种情况是pom的配置错了

由于使用了mysql8.0以上的版本,因此在配置里也要改成8.0的version,而不是5的version
正确如下:




  4.0.0

  com.testone
  testone
  1.0-SNAPSHOT

  testone
  
  http://www.example.com

  
    org.springframework.boot
    spring-boot-starter-parent
    2.0.5.RELEASE
  

  
    UTF-8
    1.7
    1.7
  

  
    
      org.springframework.boot
      spring-boot-starter-web
    
    
      mysql
      mysql-connector-java
      8.0.15
    
    
      com.alibaba
      druid
      1.1.3
    
    
      org.mybatis.spring.boot
      mybatis-spring-boot-starter
      1.3.1
    
    
      junit
      junit
      4.11
      test
    
  

  
    
      
        
        
          maven-clean-plugin
          3.1.0
        
        
        
          maven-resources-plugin
          3.0.2
        
        
          maven-compiler-plugin
          3.8.0
        
        
          maven-surefire-plugin
          2.22.1
        
        
          maven-jar-plugin
          3.0.2
        
        
          maven-install-plugin
          2.5.2
        
        
          maven-deploy-plugin
          2.8.2
        

        
          org.mybatis.generator
          mybatis-generator-maven-plugin
          1.3.7
          
            
              org.mybatis.generator
              mybatis-generator-core
              1.3.7
            
            
              mysql
              mysql-connector-java
              8.0.15
            
          
          
            
              mybatis generator
              package
              
                generate
              
            
          
         
           
           true
           
           true
           
             src/main/resources/mybatis-generator.xml
           

         
        
        
        
          maven-site-plugin
          3.7.1
        
        
          maven-project-info-reports-plugin
          3.0.0
        
      
    
  

你可能感兴趣的:(mybatis-generator运行报错Failed to execute goal org.mybatis.generator:m...)