MyBatis Generator (MBG) can be run in the following ways:
Each method is described in detail on the linked pages.
Note: there is also an Eclipse plugin for MBG that adds extra function - namely good integration into Eclipse, an Eclipse enabled Ant task, and support for automatic merging of Java files. See the MyBatis web site page for information on installing the Eclipse plugin.
Important: When running outside of an IDE environment like Eclipse, MBG interprets the targetProject and targetPackage attributes in all XML configurations as follows: