Friday 31 August 2012

Grails -- unable to download groovy 1.7.12


So I recently ran into a problem with my Grails build. The problem seem to stem from the fact that one of my dependencies (an older Groovy snapshot jar?!) can not be fetched from the main grails site. So I wanted to run `grails dependency-report` to see who's using that rouge jar...unfortunately it didn't build and gave me the same message.

This is the message that I got:


[NOT FOUND  ] org.codehaus.groovy#groovy;1.7.12-SNAPSHOT!groovy.jar (226ms)
==== http://repo.grails.org/grails/core: tried
  http://repo.grails.org/grails/core/org/codehaus/groovy/groovy/1.7.12-SNAPSHOT/groovy-1.7.12-SNAPSHOT.jar
::::::::::::::::::::::::::::::::::::::::::::::
::          UNRESOLVED DEPENDENCIES         ::
::::::::::::::::::::::::::::::::::::::::::::::
:: org.grails.plugins#cloud-support;[1.0.7,): not found
::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::
::              FAILED DOWNLOADS            ::
:: ^ see resolution messages for details  ^ ::
::::::::::::::::::::::::::::::::::::::::::::::
:: org.codehaus.groovy#groovy;1.7.12-SNAPSHOT!groovy.jar
::::::::::::::::::::::::::::::::::::::::::::::
| Downloading: groovy-1.7.12-SNAPSHOT.jar.sha1
| Error Failed to resolve dependencies (Set log level to 'warn' in BuildConfig.groovy for more information):
- org.codehaus.groovy:groovy:1.7.12-SNAPSHOT


So, to fix it (so that I can troubleshoot the problem and exclude the old Groovy snapshot jar). All I did was to add the `http://snapshots.repository.codehaus.org` repository before the grails default repositories in BuildConfig.groovy.

So it looks something like this:



repositories {
inherits true // Whether to inherit repository definitions from plugins
mavenRepo "http://snapshots.repository.codehaus.org" //comes first
grailsPlugins()
grailsHome()
grailsCentral()
mavenCentral()
mavenRepo "http://twitter4j.org/maven2"
// uncomment these to enable remote dependency resolution from public Maven repositories
mavenLocal()
mavenRepo "http://repository.codehaus.org"
mavenRepo "http://download.java.net/maven/2/"
mavenRepo "http://repository.jboss.com/maven2/"
}






2 comments: