1

I am unable to run my Grails app because of a dependency problem. BuildConfig.groovy is set to use Maven Central which has the dependencies that Grails cannot find. Any idea why?

This is a project which I only just upgraded to Grails 2.3, if that matters.

Loading Grails 2.3.0
Dependency resolver grailsPlugins already defined. Ignoring...
Dependency resolver grailsHome already defined. Ignoring...
| Configuring classpath
:: problems summary ::
:::: WARNINGS
        ::::::::::::::::::::::::::::::::::::::::::::::
        ::          UNRESOLVED DEPENDENCIES         ::
        ::::::::::::::::::::::::::::::::::::::::::::::
        :: log4j#log4j;1.2.17: configuration not found in log4j#log4j;1.2.17: 'master'. It was required from org.grails.internal#manage;1301 runtime
        :: org.jboss.netty#netty;3.2.5.Final: configuration not found in org.jboss.netty#netty;3.2.5.Final: 'compile'. It was required from com.mycompany.event#commons;35.9 compile
        :: org.springframework#spring-test;3.2.4.RELEASE: configuration not found in org.springframework#spring-test;3.2.4.RELEASE: 'compile'. It was required from org.grails#grails-plugin-testing;2.3.0 compile
        ::::::::::::::::::::::::::::::::::::::::::::::
| Error Resolve error obtaining dependencies: Failed to resolve dependencies (Set log level to 'warn' in BuildConfig.groovy for more information):
- log4j:log4j:1.2.17
- org.jboss.netty:netty:3.2.5.Final
- org.springframework:spring-test:3.2.4.RELEASE
 (Use --stacktrace to see the full trace)
:: problems summary ::
:::: WARNINGS
        ::::::::::::::::::::::::::::::::::::::::::::::
        ::          UNRESOLVED DEPENDENCIES         ::
        ::::::::::::::::::::::::::::::::::::::::::::::
        :: log4j#log4j;1.2.17: configuration not found in log4j#log4j;1.2.17: 'master'. It was required from org.grails.internal#manage;1301 runtime
        :: org.jboss.netty#netty;3.2.5.Final: configuration not found in org.jboss.netty#netty;3.2.5.Final: 'compile'. It was required from com.mycompany.event#commons;35.9 compile
        ::::::::::::::::::::::::::::::::::::::::::::::
| Error Resolve error obtaining dependencies: Failed to resolve dependencies (Set log level to 'warn' in BuildConfig.groovy for more information):
- log4j:log4j:1.2.17
- org.jboss.netty:netty:3.2.5.Final
 (Use --stacktrace to see the full trace)
| Error Failed to resolve dependencies (Set log level to 'warn' in BuildConfig.groovy for more information):
- log4j:log4j:1.2.17
- org.jboss.netty:netty:3.2.5.Final
| Run 'grails dependency-report' for further information.

How do I get Grails to find these dependencies?

Thanks!

tim_yates
  • 167,322
  • 27
  • 342
  • 338
Adam
  • 43,763
  • 16
  • 104
  • 144

1 Answers1

6

Most probably you are facing this issue because of old version of spring-test transitive dependency by plugins or any other dependency.

You need to exclude spring-test as mentioned here in the upgrade guide

As suggested by the app, running a dependency-report will be the best bet to find out conflicts and missing dependencies.

dmahapatro
  • 49,365
  • 7
  • 88
  • 117
  • I am sharing this problem, but I am unable to run a dependency report, as I get the same issue... – AnthonyMDev Jan 09 '14 at 19:28
  • I am getting this for `org.grails.plugins#tomcat;2.3.5: not found`, the [notes for the plugin](http://grails.org/plugin/tomcat) indicate this must be changed to `build ":tomcat:7.0.50"` for Grails 2.3 in `BuildConfig.groovy` – fourgablesguy Jan 23 '14 at 21:17