我需要從 io.confluent:kafka-schema-registry:5.3.0 中排除 slf4j 依賴項。我試過使用
implementation ('io.confluent:kafka-schema-registry:5.3.0') {
exclude(group='org.slf4j',module='slf4j-loh4j12')
}
但我不斷收到錯誤
Cannot set the value of read-only property 'group' for DefaultExternalModuleDependency{group='io.confluent', name='kafka-schema-registry', version='5.3.0', configuration='default'} of type org.gradle.api.internal.artifacts.dependencies.DefaultExternalModuleDependency.
誰能告訴我如何實作這一目標。我嘗試了多種方法但無法做到
uj5u.com熱心網友回復:
的語法exclude()不正確。您必須使用:代替=。exclude()將 aMap作為輸入,因此,在 Groovy DSL 中,它必須寫為:
implementation ('io.confluent:kafka-schema-registry:5.3.0') {
exclude(group: 'org.slf4j',module: 'slf4j-log4j12')
}
轉載請註明出處,本文鏈接:https://www.uj5u.com/qukuanlian/322940.html
上一篇:里面的值包括
