groovy
  1. groovy
  2. GROOVY-5395

Grape's Grab ignores 'ext' when classifier is not set

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: 1.8.6
    • Fix Version/s: None
    • Component/s: Grape
    • Labels:
      None
    • Number of attachments :
      0

      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

        Activity

        Hide
        Paul King added a comment -

        Duplicate of GROOVY-5394

        Show
        Paul King added a comment - Duplicate of GROOVY-5394

          People

          • Assignee:
            Paul King
            Reporter:
            Jakub Holư
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: