Junit was being pulled in transitively from jline - and was not needed by jline. Fixed by upgrading to the version of jline that groovy uses which has fixed dependencies.