Grails不包括EmailValidator(commons-validator)依赖项

时间:2016-11-02 10:39:04

标签: grails dependencies grails-2.0

我试图从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"
}

有没有人对如何实现财产有任何建议?

1 个答案:

答案 0 :(得分:3)

如果您在新的Grails 2.5.5应用程序上执行<!-- Since angular2 stable release multiple directives are not supported on a single element(from the docs) still you can use it like below --> <ul class="list-group"> <template ngFor let-item [ngForOf]="stuff" [ngForTrackBy]="trackBy_stuff"> <li *ngIf="item.name" class="list-group-item">{{item.name}}</li> </template> </ul>,您可以看到:

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 不再出现在类路径中。