maven - Unresolved 依赖项Grails 2.3

标签 maven grails log4j grails-2.3

由于存在依赖性问题,我无法运行我的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查找这些依赖项?

谢谢!

最佳答案

很可能是因为插件的旧版本spring-test可传递依赖项或任何其他依赖关系而面临此问题。

您需要排除upgrade guide中此处提到的spring-test
根据应用程序的建议,运行dependency-report将是找出冲突和缺少依赖项的最佳选择。

关于maven - Unresolved 依赖项Grails 2.3,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18793537/

相关文章:

java - 如何在 log4j2 中动态打开或关闭 rootLogger 的一个附加程序?

java - Maven 告诉我我有一个 AMD64 处理器。我绝对使用英特尔处理器。这是怎么回事?

java - 从外部 JAR 加载没有名称的 JDBC 驱动程序

java - 通过命令行 cucumber maven

maven - GlassFish 3 + Maven + 远程部署

testing - Grails 测试和@Transactional

java - log4j2 ERROR异常添加回车?

java - Spring Security ACL继承: How does it really works?

grails - 在grails命令中指定参数

java - Log4j 多个 appender 独立