在我的grails 2.3.4应用程序中(从grails 2.2.3升级后),当我运行grails命令行grails install-plugin pluginname时,我得到了以下错误,即使我尝试了grails list-plugins,我也得到了相同的错误:
Error Resolve error obtaining dependencies: Failed to resolve dependencies (Se log level to 'warn' in BuildConfig.groovy for more information): org.grails.plugins:tomcat:2.3.4 (Use --stacktrace to see the full trace)我检查了BuildConfig.groovy没有Tomcat2.3.4,我使用的是7.0.47,下面是我的插件:
runtime ":hibernate:3.6.10.6"
runtime ":jquery:1.8.3"
runtime :resources:1.1.6
build ":tomcat:7.0.47"
runtime database-migration:1.2.1
compile :cache:1.0.1我该如何解决这个问题?
发布于 2014-02-17 23:16:55
您的问题似乎是可以解决的,因为...you需要先清理grails项目,而不是构建它,然后再进行
grails refresh-dependencies然后最后
grails clean和
grails compile当您运行refresh-dependencies时,Grails应用程序将尝试解析BuildConfig.groovy文件中定义的grails插件。如果这不起作用,删除插件并执行上述步骤,直到您在问题中发布的错误消失,然后添加正确的插件格式和版本以及正确的优先依赖关系,然后确保一切工作正常。
发布于 2014-02-18 22:39:56
您的依赖项在依赖项块中,但它们是插件。将它们放在BuildConfig.groovy文件的插件块中。因此,不要使用您已有的内容,而应放入以下内容:
plugins {
runtime ":hibernate:3.6.10.6"
runtime ":jquery:1.8.3"
runtime ":resources:1.1.6"
build ":tomcat:7.0.47"
runtime ":database-migration:1.2.1"
compile ":cache:1.0.1"
}此外,这也不是“依赖”块。然而,这是一个依赖关系块。有关Grails中依赖项解析的信息,请参阅this link。
发布于 2015-08-29 20:53:40
我需要在buildconfig.groovy中将以下存储库添加到存储库部分:
mavenRepo "https://repo.grails.org/grails/plugins"https://stackoverflow.com/questions/21830577
复制相似问题