-
Notifications
You must be signed in to change notification settings - Fork 446
Description
Related to #1613, and highlighted by #1874 and #1885:
From release 4.7.0, the picocli-groovy module had org.codehaus.groovy:groovy-all as dependency.
The idea was that this was necessary because the picocli-groovy module exports Groovy API.
For example, picocli.groovy.PicocliBaseScript2 extends groovy.lang.Script.
However, the org.codehaus.groovy Maven coordinates have been superceded by org.apache.groovy since Groovy 4.
By requiring org.codehaus.groovy:groovy-all, picocli brings in an older version of Groovy (Groovy 2.4.x), on top of the version of Groovy that is being used to launch the picocli-based Groovy script.
This caused the problem highlighted by #1874 and #1885: IllegalStateException: Error registering runner class 'org.codehaus.groovy.testng.TestNgRunner'.
Since the picocli-groovy module is giving support for Groovy scripts, it should rely on the Groovy version in the environment where the script is run, and should not attempt to bring in its own version of Groovy.
Concretely, the Groovy dependency should be reverted back to compileOnly from api in the picocli-groovy Gradle build script.