0

我正在使用 Grails 2.4.3 我已将com.google.guava:guava:10.0.1lib 包含在 $GRAILS_HOME/libs/ 中,并且 $GRAILS_HOME/libs/ 中的所有依赖项都包含在我的应用程序中,方法是按照我的 BuildConfig.groovy 中的代码

    grails.project.dependency.resolution = {
        // inherit Grails' default dependencies
        inherits("global") {
    }
    .....
    }

现在的问题是我想使用最新版本,com.google.guava:guava:21.0那么如何排除com.google.guava:guava:10.0.1来自 $GRAILS_HOME/libs/ 的默认库?

4

1 回答 1

0

您可以像在文档中解释的那样覆盖 BuildConfig.groovy 中的依赖项:http ://docs.grails.org/2.4.3/guide/conf.html#configurationsAndDependencies

dependencies {
    compile 'com.google.guava:guava:21.0'
}
于 2017-03-09T07:41:19.217 回答