【问题标题】:Grails exclude EmailValidator (commons-validator) dependencyGrails 排除 EmailValidator (commons-validator) 依赖
【发布时间】:2017-03-15 15:25:50
【问题描述】:

我正在尝试从 Grails 默认依赖项中排除 Apache Commons 库版本 1.4.0,因为它有一个错误; https://github.com/grails/grails-core/issues/9000

有些人建议用新的依赖项覆盖,所以我尝试了以下方法无济于事。

inherits("global") {
        // uncomment to disable ehcache
        // excludes 'ehcache'
        excludes 'commons-validator'
    }

...

dependencies {
    compile "commons-validator:commons-validator:1.5.1"
}

有人对如何实现这一目标有任何建议吗?

【问题讨论】:

    标签: grails dependencies grails-2.0


    【解决方案1】:

    如果您在新的 Grails 2.5.5 应用程序上执行 grails dependency-report,您会看到:

    +--- org.grails:grails-plugin-url-mappings:2.5.5
    |    \--- com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:1.4
    |    \--- org.grails:grails-validation:2.5.5
    |         \--- commons-validator:commons-validator:1.4.0
    

    我认为如果您只添加依赖项并删除excludes,它应该可以工作。现在如果我们执行依赖报告:

    +--- org.grails:grails-plugin-url-mappings:2.5.5
    |    \--- com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:1.4
    |    \--- org.grails:grails-validation:2.5.5
    +--- commons-validator:commons-validator:1.5.1
    

    1.4.0 版本不再在类路径中。

    【讨论】:

      猜你喜欢
      • 2015-09-29
      • 1970-01-01
      • 2014-12-02
      • 2016-06-11
      • 2023-03-04
      • 1970-01-01
      • 2023-03-27
      • 2012-11-03
      • 1970-01-01
      相关资源
      最近更新 更多