2 Feb 2015

Grails Error Grabbing Grapes

After upgrading a Grails project to version 2.3.11, I received an "error grabbing grapes" and found the solution to add a grapeConfig.xml

I use Groovy Grapes in my grails project service to perform some HTML screen scraping with GET and Selenium.

@Grapes([
    @Grab("org.codehaus.geb:geb-core:0.7.2"),
    @Grab("org.seleniumhq.selenium:selenium-htmlunit-driver:2.37.1"),
    @Grab("org.seleniumhq.selenium:selenium-support:2.37.1")
])

I corrected the problem by creating the ~/.groovy/grapeConfig.xml file as described here. The contents are:

<ivysettings>
  <settings defaultResolver="downloadGrapes"/>
  <resolvers>
  <chain name="downloadGrapes">
  <filesystem name="cachedGrapes">
  <ivy pattern="${user.home}/.groovy/grapes/[organisation]/[module]/ivy-[revision].xml"/>
  <artifact pattern="${user.home}/.groovy/grapes/[organisation]/[module]/[type]s/[artifact]-[revision].[ext]"/>
  </filesystem>
  <!-- todo add 'endorsed groovy extensions' resolver here --> <ibiblio name="codehaus" root="http://repository.codehaus.org/" m2compatible="true"/>
  <ibiblio name="ibiblio" m2compatible="true"/>
  <ibiblio name="java.net2" root="http://download.java.net/maven/2/" m2compatible="true"/>
  </chain>
 </resolvers>
</ivysettings>

Tags:
0 comments