
Я хочу глобально исключить SLF4J-log4j12 < /code> jar из моего построенного Jar. Итак, я попробовал это: < /p>
Код: Выделить всё
configurations {
runtime.exclude group: "org.slf4j", name: "slf4j-log4j12"
}
Код: Выделить всё
org.slf4j#slf4j-api is excluded from com.pivotal.gfxd:gfxd-demo-mapreduce:1.0(runtime).
org.slf4j#slf4j-simple is excluded from com.pivotal.gfxd:gfxd-demo-mapreduce:1.0(runtime).
org.slf4j#slf4j-log4j12 is excluded from org.apache.hadoop:hadoop-common:2.2.0(runtime).
Код: Выделить всё
configurations {
runtime.exclude name: "slf4j-log4j12"
}
< /code>
, который в конечном итоге исключает [b] все < /strong> из сборки! Как будто я указал группу: "*"
update 2: [/b]
Я использую Gradle версию 1.10 для этого.
Подробнее здесь: https://stackoverflow.com/questions/217 ... ing-gradle