mybatis的generator出现Exception getting JDBC Driver
Failed to execute goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.5:generate (default-cli) on project miaosha: Execution default-cli of goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.5:generate failed: Exception getting JDBC Driver: com.mysql.jdbc.driver -> [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
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.694 s
查看了pom.xml文件中编写的内容 没发现缘由,但是在去掉dependcy时还是会出现这个问题...症状一致
请诸位告知可能引发这个问题出现的原因,好修改。
<plugin> <groupId>org.mybatis.generator</groupId> <artifactId>mybatis-generator-maven-plugin</artifactId> <version>1.3.5</version> <!-- 实际项目会有反复的情况--> <configuration> <!-- 允许移动生成的文件 默认不可以 是否覆盖设置为true--> <verbose>true</verbose> <overwrite>true</overwrite> <configurationFile> src/main/resources/mybatis-generator.xml </configurationFile> </configuration> <!-- 使用插件必须要有依赖--> <!-- 使用的是mysql数据库 因此对Mysql进行解析--> <dependencies> <dependency> <groupId>org.mybatis.generator</groupId> <artifactId>mybatis-generator-core</artifactId> <version>1.3.5</version> </dependency> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>5.1.41</version> </dependency> </dependencies> <!-- 指定导入之后要做的execution--> <!-- phase阶段在package阶段 goal是做一个generate--> <executions> <execution> <id>mybatis generator</id> <phase>package</phase> <goals> <goal>generate</goal> </goals> </execution> </executions> </plugin>