10

I am trying to upgrade a project to grails version 2.4.4 but it keep failing with the following error message:

:: problems summary ::
:::: WARNINGS
::::::::::::::::::::::::::::::::::::::::::::::
::          UNRESOLVED DEPENDENCIES         ::
::::::::::::::::::::::::::::::::::::::::::::::
:: cglib#cglib;2.2.2: configuration not found in cglib#cglib;2.2.2: 'compile'. It was required from org.grails#grails-plugin-testing;2.4.4 runtime
::::::::::::::::::::::::::::::::::::::::::::::

Error |
Resolve error obtaining dependencies: Failed to resolve dependencies (Set log level to 'warn' in BuildConfig.groovy for more information):
- cglib:cglib:2.2.2
(Use --stacktrace to see the full trace)
Error |
Failed to resolve dependencies (Set log level to 'warn' in BuildConfig.groovy for more  information):
- cglib:cglib:2.2.2
|Run 'grails dependency-report' for further information.

This s kind of weird since the library is available. I can see it under grails-2.4.4\lib\cglib\cglib\jars and in my home directory under .grails\ivy-cache\cglib\cglib\jars

My GRAILS_HOME is set correctly and for what I can see all looks fine but when I do a refresh dependencies it keeps throwing this error.

hertog
  • 219
  • 2
  • 5
  • maybe in BuildConfig changing grails.project.dependency.resolver from maven to ivy would help? – changtung Nov 26 '14 at 10:06
  • @cyan You really shouldn't do that. – Jeff Scott Brown Nov 26 '14 at 20:54
  • Does it happen with a newly created 2.4.4 app? One thing to look for is confirm that you have the necessary repository configured in `BuildConfig.groovy`. For example, does the problem happen if you have `mavenCentral()` configured? – Jeff Scott Brown Nov 26 '14 at 20:56
  • 1
    I ran into a similar dependency problem in Grails. I was able to solve the issue with this [answer](http://stackoverflow.com/a/28836825/311525) – Scott Mar 31 '15 at 17:32

1 Answers1

18

In upgrading from Grails 2.1 to 2.4.4 I found I had that same issue. The resolution was to explicitly set:

grails.project.dependency.resolver = "maven"

in BuildConfig.groovy. Then I was able to move on to the next issue in the upgrade ... ;-)

Scott Presnell
  • 1,528
  • 10
  • 23