1. Download mybatis source code
Download address: https://github.com/mybatis/mybatis-3
The latest mybatis-3-mybatis-3.4.6 I downloaded, unzip it after downloading. Open pom.xml
<parent>
<groupId>org.mybatis</groupId>
<artifactId>mybatis-parent</artifactId>
<version>30</version>
<relativePath />
</parent>
It is found that mybatis source code depends on mybatis-parent, so download mybatis-parent before compiling
2. Download mybatis-parent source code
Download address: https://github.com/mybatis/parent
The downloaded version of mybatis-parent should be the same as the version of the mybatis source file pom.xml.
3. Compile mybatis-parent source code
Change to the mybatis-parent directory you downloaded:
mvn clean install
3. Compile mybatis source code
Switch to the mybatis source directory you downloaded:
mvn clean
mvn install -Dmaven.test.skip=true
If the following error occurs:
Open the pom.xml file and comment out the maven-pdf-plugin plugin
<!--
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pdf-plugin</artifactId>
</plugin>
-->
then recompile
4. Import IDEA
Not much to say about the import method, just import it according to the maven project! After successful import: