Details
Description
Try this in Groovy Console:
@Grab(group="junit", module="junit", version="8.5") // version doesn't exist, so error is ok class Foo {} 1 compilation error: Exception thrown: Error grabbing Grapes -- [unresolved dependency: junit#junit;8.5: not found] java.lang.RuntimeException: Error grabbing Grapes -- [unresolved dependency: junit#junit;8.5: not found] @Grab(group="junit", module="junit", version="4.7") // we fixed the version, but Grapes still looks for 8.5! class Foo {} 1 compilation error: Exception thrown: Error grabbing Grapes -- [unresolved dependency: junit#junit;8.5: not found] java.lang.RuntimeException: Error grabbing Grapes -- [unresolved dependency: junit#junit;8.5: not found]
Just want to add that outside the groovyconsole, the issue can also be reproduced using the following script: