Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The picocli-groovy module should not declare org.codehaus.groovy:groovy-all as dependency #1933

Closed
remkop opened this issue Jan 25, 2023 · 0 comments
Labels
lang: groovy Groovy-related theme: build An issue or change related to the build system theme: compatibility Issues related to binary and source backwards compatibility theme: integration An issue or change related to integration with other frameworks, shells or operating systems type: bug 🐛
Milestone

Comments

@remkop
Copy link
Owner

remkop commented Jan 25, 2023

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.

@remkop remkop added type: bug 🐛 theme: compatibility Issues related to binary and source backwards compatibility theme: integration An issue or change related to integration with other frameworks, shells or operating systems theme: build An issue or change related to the build system lang: groovy Groovy-related labels Jan 25, 2023
@remkop remkop added this to the 4.7.1 milestone Jan 25, 2023
@remkop remkop closed this as completed in 57cbd80 Jan 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lang: groovy Groovy-related theme: build An issue or change related to the build system theme: compatibility Issues related to binary and source backwards compatibility theme: integration An issue or change related to integration with other frameworks, shells or operating systems type: bug 🐛
Projects
None yet
Development

No branches or pull requests

1 participant