First things first, you will need to have subversion installed on your local machine. You can get it from the Subversion site.
Next step is to check out the latest code from the iBATIS respository.
%> svn -co http://svn.apache.org/repos/asf/ibatis/trunk
At this point you should have the entire directory structure starting with trunk in your working directory.
%> cd trunk/java/mapper/mapper2/build
You are now in the build directory. There are multiple scripts in this directory for building ibatis.
Now just run the build.sh file:
The default build target is 'all', but you can run different targets by passing the name to the build.sh file. For example, to run the 'clean' target, you would do this:
%> ./build.sh clean
You get the picture