Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
3.0.0, 3.0.1
-
None
-
Reproduced under both macOS (Groovy 3.0.1 installed manually and via MacPorts) and Debian (Groovy installed via SDKMAN).
Description
(Issue originally raised as: https://github.com/remkop/picocli/issues/970)
Consider the following minimal script:
@Grab('info.picocli:picocli:4.2.0') import groovy.cli.picocli.CliBuilder def cli = new CliBuilder()
Under Groovy 2.5.9, this runs without error; with 3.0.1, however, I see:
$ groovy cli.groovy Caught: java.lang.NoClassDefFoundError: picocli/CommandLine$ParameterException java.lang.NoClassDefFoundError: picocli/CommandLine$ParameterException at cli.run(cli.groovy:4) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) Caused by: java.lang.ClassNotFoundException: picocli.CommandLine$ParameterException ... 4 more
The jar is definitely downloaded to ~/.groovy/grapes and both versions of Groovy output
Resolving dependency: info.picocli#picocli;4.2.0 {default=[default]} Preparing to download artifact info.picocli#picocli;4.2.0!picocli.jar
when -Dgroovy.grape.report.downloads=true is supplied.