Gradle - Exclure la journalisation commune de Spring
Exemple Gradle pour exclurecommons-logging des frameworks Spring.
build.gradle
compile('org.springframework:spring-webmvc:4.2.4.RELEASE'){
exclude group: 'commons-logging', module: 'commons-logging'
}
Si vous avez plusieurs dépendances Spring, vous devez exclure pour chaque
build.gradle
compile('org.springframework:spring-webmvc:4.2.4.RELEASE'){
exclude group: 'commons-logging', module: 'commons-logging'
}
compile('org.springframework:spring-test:4.2.4.RELEASE'){
exclude group: 'commons-logging', module: 'commons-logging'
}
Une meilleure solution consiste à exclure lescommons-logging au niveau du projet.
build.gradle
configurations.all {
exclude group: "commons-logging", module: "commons-logging"
}
compile 'org.springframework:spring-webmvc:4.2.4.RELEASE'
compile 'org.springframework:spring-test:4.2.4.RELEASE'