For Mac El Capitan onward (possibly Mavericks before that too), need more memory given to JRE by setting ANT_OPTS.