下载地址:https://github.com/mybatis/mybatis-3
我下载的最新的 mybatis-3-mybatis-3.4.6,下载完后解压。打开pom.xml
- <parent>
- <groupId>org.mybatis</groupId>
- <artifactId>mybatis-parent</artifactId>
- <version>30</version>
- <relativePath />
- </parent>
发现mybatis源码依赖mybatis-parent 所以编译前要先下载mybatis-parent
下载地址:https://github.com/mybatis/parent
下载的mybatis-parent版本要和mybatis源文件pom.xml 版本一致。
切换到你下载的mybatis-parent目录:
- mvn clean install
切换到你下载的mybatis源码目录:
- mvn clean
-
- mvn install -Dmaven.test.skip=true
如果出现如下错误:
打开pom.xml 文件注释掉 maven-pdf-plugin 插件
- <!--
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-pdf-plugin</artifactId>
- </plugin>
- -->
然后重新编译
导入方式就不多说,按maven项目导入即可!导入成功后: