To create an H-Sphere package file (.hsp), you have to:
lang-files/ directory
merchgateway-sdk/[YourGatewayName]/package_name-version-build.hsp bundle.
If you run "ant" command without any arguments, SDK will compile all classes. If successful, it will execute junit tests. If all tests are also successful, it will start the packaging process. At the end, you should see the package_name-version-build.hsp file in the Merchant Gateway SDK base directory. The build number will be automatically incremented after each build. You can reset it by modifying the build.number file.
Also, you can run set of test transactions by running the "ant test" command after the merchant gateway java class is compiled.