Issue
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:
- Adding Maven Central to ~/.groovy/grapeConfig.xml
- grape -r https://repo1.maven.org/maven2 resolve org.apache.httpcomponents httpclient 4.2.1
Viewing the debug output, it doesn't even appear to be requesting it from central.
Solution
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).
Answered By - Mike Robinet
Answer Checked By - Mary Flores (JavaFixing Volunteer)