0

I can't import the RESTClient in my grails project. The message is:

Groovy:unable to resolve class groovyx.net.http.RESTClient

In the BuildConfig.groovy I uncommented:

mavenRepo "http://repository.codehaus.org"

and added:

compile ":rest-client-builder:2.0.0"

I'm using grails 2.3.8 and Windows 7.

Any ideas? The grails install-plugin does not work in this grails version.

thor
  • 21,418
  • 31
  • 87
  • 173
user1010775
  • 361
  • 3
  • 7
  • 24

1 Answers1

3

The rest-client-builder plugin doesn't provide a class called groovyx.net.http.RESTClient. I think you are getting confused with Groovy's REST client module:

http://groovy.codehaus.org/modules/http-builder/doc/rest.html

The above module is not however recommended for us inside Grails applications and you are far better off with the rest-client-builder plugin, you just need to use the right API.

The docs for rest-client-builder are at

https://github.com/grails-plugins/grails-rest-client-builder/

and

http://grails.github.io/grails-data-mapping/rest-client/api/index.html

Graeme Rocher
  • 7,985
  • 2
  • 26
  • 37