Slackbot
06/07/2022, 4:37 PMFleshgrinder
06/07/2022, 5:00 PMBrandon Reyna
06/07/2022, 5:07 PMBrandon Reyna
06/07/2022, 5:08 PMFleshgrinder
06/07/2022, 5:09 PMFleshgrinder
06/07/2022, 5:11 PMrm -fr ~/.gradle
and import your project from scratch to see if it shows up again. Maybe this is just a left over from some build you ran months ago. It’s generally good practice to not wipe this stuff locally for optimal build performance across projects, but if you want to be absolutely certain that Log4j 2 does not show up anywhere, this is a way to go.Brandon Reyna
06/07/2022, 5:11 PMVampire
06/07/2022, 5:12 PMFleshgrinder
06/07/2022, 5:12 PMVampire
06/07/2022, 5:12 PMVampire
06/07/2022, 5:12 PMVampire
06/07/2022, 5:13 PMBrandon Reyna
06/07/2022, 5:13 PMVampire
06/07/2022, 5:13 PMdependencies
and buildEnvironment
tasks to find where it comes fromBrandon Reyna
06/07/2022, 5:14 PMFleshgrinder
06/07/2022, 5:18 PMBrandon Reyna
06/07/2022, 5:21 PMFleshgrinder
06/07/2022, 5:27 PMbuild.gradle
should do the trick:
buildscript {
dependencies {
classpath("org.apache.logging.log4j:log4j-core:2.17.2")
}
}
configurations.all {
project.dependencies.add(name, "org.apache.logging.log4j:log4j-core:2.17.2")
}
This basically adds Log4j core with the latest version everywhere and thus forces resolution to this version. This is brute force and most probably has unwanted side effects, but it should work. Newer Gradle versions have better APIs to do something like this, and maybe Gradle 4.1 had some of those already too, but, as I said, Gradle 4.1 is way back for me, so I don’t remember.Vampire
06/07/2022, 5:29 PMVampire
06/07/2022, 5:29 PMlog4j-core
at all, that's imho a bug per-seFleshgrinder
06/07/2022, 5:30 PMFleshgrinder
06/07/2022, 5:31 PMFleshgrinder
06/07/2022, 5:31 PMBrandon Reyna
06/07/2022, 5:41 PMBrandon Reyna
06/07/2022, 5:41 PMFleshgrinder
06/07/2022, 5:48 PMVampire
06/07/2022, 6:07 PMso, it could be a plugin issue in the project gradle files right?I already told you how to find out, you just ignored it. 😉
Brandon Reyna
06/07/2022, 6:09 PMBrandon Reyna
06/07/2022, 8:33 PMBrandon Reyna
06/07/2022, 8:33 PMBrandon Reyna
06/07/2022, 8:33 PMFleshgrinder
06/07/2022, 9:42 PM