Try the following method, got it work for me.
- Make sure you have ant installed
- Open Eclipse, select File > New > Project
- Select "Java Project from Existing Ant Build File"
- Download ant-contrib.jar, then unzip it and put the jar file to where you prefer.
- Add the ant-contrib jar file to Eclipse: Window>Preferences>Ant>Runtime>Global Entries>Add external jar
- Configure your build.properties. (copy and edit build.properties.example to build.properties)
- Now open build.xml in editor in Eclipse then hit Run
- Add the built jar files in your project properties, Project Properties>Java Build Path>Add JAR