0

I tried the primary solutions given in How to import grovyx.net.http:, i.e.:

I'm running IntelliJ IDEA 11.1.5, so it prompts to "refresh things" after making these changes, which I did. After that didn't work I closed the project and reopened it, but it still claims in cannot resolve groovyx:

 import groovyx.net.http.*

What else should I do? If someone can give me insights on why this isn't more direct to resolve (i.e. why what I've got is wrong), I'd appreciate it. However right now just getting it to compile would be great. Thanks much.

(doing a grails clean and rebuild did not help unfortunately)

Community
  • 1
  • 1
Ray
  • 5,885
  • 16
  • 61
  • 97
  • What do you have in `BuildConfig` right now? And do you want to use [restrpc](http://grails.org/plugin/restrpc) plugin or [rest](http://grails.org/plugin/rest) plugin? – dmahapatro Jul 18 '13 at 02:49

1 Answers1

0

Add this to your build config:

        runtime 'org.apache.httpcomponents:httpclient:4.2.1'            
        runtime "org.codehaus.groovy.modules.http-builder:http-builder:0.5.2", {
            excludes "commons-logging", "httpclient", "xml-apis", "groovy"
        }
moskiteau
  • 1,104
  • 11
  • 19
  • Based on the last post I did finally add the following in to the dependencies area: compile('org.codehaus.groovy.modules.http-builder:http-builder:0.5.0') { excludes "commons-logging", "xml-apis", "groovy" }. This did resolve it but I'm wondering how come the other solutions above don't work (1) and (2) why you would try to solve a compile time problem with a runtime type statement. – Ray Jul 18 '13 at 17:39
  • 1) well, i fixed this a long time ago, but from what i can remember, it was missing some needed classes and added unneeded classes. 2) runtime, because you surely don't need rest libraries at compile time... – moskiteau Jul 18 '13 at 19:35
  • Confused - if my IDE (intellij) won't compile something -- ie. says it can't resolve a symbol (groovyx) then this isn't a runtime issue, but a compile-time issue. Right? – Ray Jul 19 '13 at 15:51