Downgraded groovy version and fix for MacOS X.