Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-8655

Grapes fails to download artifact if POM exists in m2 local, but jar does not

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 2.5.0
    • None
    • Grape
    • None
    • Groovy Version: 2.5.0 JVM: 1.8.0_172 Vendor: Azul Systems, Inc. OS: Mac OS X

    Description

       

      Steps to reproduce:

      • These instructions use slf4j-api as an example, but it is reproducible with any artifact.
      • Remove local Grapes cache: rm -rf ~/.groovy/Grapes
      • Remove org.slf4j:slf4j-api artifacts from Maven local cache: rm -rf ~/.m2/repository/org/slf4j/slf4j-api
      • Remove any custom Ivy or Grapes config
      • Download POM only for slf4j-api: mvn dependency:get -Dartifact=org.slf4j:slf4j-api:1.7.25:pom -Dtransitive=false
      • Attempt to install slf4j-api using Grapes: grape -V install org.slf4j slf4j-api 1.7.25

      Expected behavior:

      • slf4j-api 1.7.25 jar is downloaded from jcenter

      Actual Behavior:

      • Fails to retrieve jar with NOT FOUND error (verbose log attached):

       

      :: problems summary ::
      :::: WARNINGS
       [NOT FOUND  ] org.slf4j#slf4j-api;1.7.25!slf4j-api.jar (0ms)
       ==== localm2: tried
         file:/Users/Mike/.m2/repository/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25.jar
      

      Workaround:

      • Delete slf4j-api/1.7.25 folder in Maven local and Grapes cache folder and reinstall.

      Additional notes:

      It is fairly common to only have the POM file for artifacts in your Maven local. I use the gradle-versions-plugin frequently which is just one example of a tool that downloads only POM files for artifacts. 

      Attachments

        1. grapeError.log
          6 kB
          Mike Robinet

        Issue Links

          Activity

            People

              Unassigned Unassigned
              mrobinet Mike Robinet
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: