add ant task, fix some bugs