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.

3
  • Could You please paste the whole BuildConfig.groovy? Commented Jun 22, 2014 at 18:10
  • I have that plugin but not in the "compile" section. I have it as build ":rest-client-builder:2.0.1" Commented Jun 22, 2014 at 19:11
  • 1
    Its always worth trying grails clean-all when seeing errors like this... Commented Jun 23, 2014 at 1:24

1 Answer 1

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.