groovy - Why is Grapes grabbing a jar I didn't ask for? -


i want write simple groovy script uses apache httpclient 4.1 , since don't have jar, want grab grapes. have far in script is..

@grab(group='org.apache.httpcomponents', module='httpclient', version='4.0') import org.apache.http.impl.client.defaulthttpclient; 

but when run exception..

java.lang.runtimeexception: error grabbing grapes -- [download failed: commons-logging#commons-logging;1.1.1!commons-logging.jar] 

why grapes getting commons logging when asked http client? if because latter needs former, need explicitly grab of dependent jars of http client myself? how know are? there way tell grapes on own?

this happening because commons-logging transitive dependency i.e. dependency of org.apache.httpcomponents:httpclient.

you presumably having problem because local maven repo doesn't have commons-logging , doesn't know how (or isn't configured) it.


Comments

Popular posts from this blog

android - Why am I getting the message 'Youractivity.java is not an activity subclass or alias' -

Making Empty C++ Project: General exception (Exception from HRESULT:0x80131500) Visual Studio Community 2015 -

How to fix java warning for "The value of the local variable is not used " -