Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.8.6
-
None
Description
The value of ext (and also type) in Grab is only taken into account if classifier is set, I believe this to be a mistake. For example Grape cannot be used to retrieve the following artifact, which has packaging=orbit but an artifact with the extension .jar:
@Grab(group='org.eclipse.jetty.orbit', module='javax.servlet', version='3.0.0.v201112011016', ext='jar')
Therefore Grab should respect the value of ext even if classifier is not set. (And in any case it should at least report that there are some arguments that are ignored.)
Steps to reproduce:
$ groovysh groovy:000> org.apache.ivy.util.Message.setDefaultLogger(new org.apache.ivy.util.DefaultMessageLogger(org.apache.ivy.util.Message.MSG_DEBUG)); groovy:000> groovy.grape.Grape.grab(autoDownload: true, group: 'org.eclipse.jetty.orbit', module: 'javax.servlet', version: '3.0.0.v201112011016', ext: 'jar')
See https://github.com/groovy/groovy-core/blob/master/src/main/groovy/grape/GrapeIvy.groovy#L298