Building from Source
All MyBatis Generator (MBG) distributions include source code. The only compile time dependency is on ant.jar - for successful compilation of the included Ant task. It is straight forward to compile MBG from source - simply unzip the source in a distribution and compile it with your favorite tool.
The MBG distribution does not contain the tests that are run during the build, or other classes that are a necessary part of the build. If you would like to inspect those classes, or build MBG from the very latest version of the source code at Google then follow these steps:
- MBG is built with Apache Maven. First you must get maven running. If you are new to Maven, here are the most simple steps (for Windows):
- Download a Maven distribution from http://maven.apache.org/
- Unzip the distribution somewhere convenient
- Setup environment variables and the PATH. Examples:
- Do a Subversion checkout of the source tree from the location https://mybatis.googlecode.com/svn/sub-projects/generator/trunk/core/ (You may use any Subversion client you prefer. We recommend TortoiseSVN.)
- Open a command window in the directory where you checked out the source and run the command mvn clean install - or any of the other Maven lifecycle commands. You can use the mvn site command to generate the code coverage reports, but the MyBatis website is not built with Maven at this time.