1

Fresh install of Groovy and for some reason it isn't pulling artifacts from Maven central:

$ grape resolve org.apache.httpcomponents httpclient 4.2.1
Error in resolve:
    Error grabbing Grapes -- [download failed: org.apache.httpcomponents#httpclient;4.2.1!httpclient.jar, download failed: org.apache.httpcomponents#httpcore;4.2.1!httpcore.jar, download failed: commons-logging#commons-logging;1.1.1!commons-logging.jar]

Complete -d debug log: https://gist.github.com/mrobinet/a86073e35771cab55665

Environment:

$ groovy --version
Groovy Version: 2.4.4 JVM: 1.7.0_79 Vendor: Oracle Corporation OS: Mac OS X

The artifacts clearly exist: https://repo1.maven.org/maven2/org/apache/httpcomponents/httpclient/4.1.2/

Things I've tried:

Viewing the debug output, it doesn't even appear to be requesting it from central.

M. Justin
  • 14,487
  • 7
  • 91
  • 130
Mike Robinet
  • 823
  • 6
  • 19
  • This might be a duplicate of http://stackoverflow.com/questions/19993227/why-wont-groovy-grape-resolve-artifacts-from-maven-central, but it is a year old with no answer. – Mike Robinet Aug 28 '15 at 18:51
  • 1
    Can you post the `-d` output in a gist? – JBaruch Aug 28 '15 at 19:17
  • Great idea! Edited to add a link to the gist: https://gist.github.com/mrobinet/a86073e35771cab55665 – Mike Robinet Aug 28 '15 at 19:21
  • Hm, I don't see it going out to any internet repository at all. It only checks your ivy caches and maven caches. Are you sure you are running with the default ivy config? – JBaruch Aug 28 '15 at 19:28
  • Yeah. The `~/.ivy` directory does not even exist and no `~/.groovy/grapeConfig.xml` either. – Mike Robinet Aug 28 '15 at 19:30
  • I tried this locally (albeit on Windows 7 with Oracle Java 1.7.0_72 and Groovy 2.4.4) and everything worked (with and without `~/.m2`). I added `-d` and then compared my output to your gist. I couldn't spot a difference that might be significant. I don't have `~/.groovy/grapeConfig.xml`. I even tried without `~/.groovy` as well. I am not using `gvm` (your gist suggests that you are). – smooth reggae Aug 29 '15 at 04:57

1 Answers1

0

I recently ran into this again and was able to figure out the issue. I ended up filing a bug with Groovy: https://issues.apache.org/jira/browse/GROOVY-8655

The problem occurs when you have only a POM file for the artifact in your Maven local repository (no jar file).

Mike Robinet
  • 823
  • 6
  • 19