1

由于依赖问题,我无法运行我的 Grails 应用程序。BuildConfig.groovy 设置为使用具有 Grails 无法找到的依赖项的 Maven Central。知道为什么吗?

这是一个我刚刚升级到 Grails 2.3 的项目,如果这很重要的话。

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.

如何让 Grails 找到这些依赖项?

谢谢!

4

1 回答 1

6

很可能你正面临这个问题,因为旧版本的spring-test插件传递依赖或任何其他依赖。

您需要spring-test按照升级指南中的说明排除

正如应用程序所建议的那样,运行 adependency-report将是找出冲突和缺失依赖项的最佳选择。

于 2013-09-13T19:24:52.737 回答