Indexing process pulling log4j 1.2.12 to Maven Repository
Answered
I’ve noticed a strange behavior: when I open an existing project that requires indexing, IntelliJ IDEA starts pulling log4j 1.2.12 into my .m2/repository.
This dependency is not declared anywhere in the project’s pom.xml.
I’m currently using IntelliJ IDEA 2025.3, but I’ve observed the same behavior in earlier versions as well.
Does anyone know what might be causing this?
Please sign in to leave a comment.
Hello Twanger
It looks like a transitive dependency from a Maven/Gradle plugin, test utility, or auxiliary indexing/import component is causing Maven Resolver to fetch log4j:log4j:1.2.12 during the project’s sync/indexing phase, even though your pom.xml doesn’t declare it directly. To confirm where it comes from please check the following:
mvn -q dependency:tree -Dincludes=log4j:log4jto see if any module or plugin in your reactor brings it in transitively. If your project is multi-module, run it per module to catch scope-specific pulls (tests/build plugins). This helps prove it’s not in your effective dependencies if the tree is empty for your main modules, and highlights plugins/tests if present.m2/repository/org/apache/log4j/log4j/1.2.12/_remote.repositoriesto see which repository entry wrote it and when. The timestamp helps correlate with the indexing/import moment.gradle dependencies | grep -i log4jto ensure no Gradle-side tool pulls it. We’ve seen mixed repos where Gradle parts influence the IDE’s setup/import and trigger unexpected resolutions.If nothing above applies to your case please collect the logs by going to Help | Collect Logs and Diagnostic Data, attaching the zip file here or through our secure upload site https://uploads.jetbrains.com/, and sharing the uploadID.
Problem is indeed caused by one or more maven plugins we use in our pom files. So not an Intellij issue. Thanks for your support!
Hi Twanger
Thanks for the update. We're here to help, so if you have any further questions, please don't hesitate to let us know.
Have a great day!
Monica!
We have further investigated the issue, and we think that this is either a bug of IDEA or of the Maven plugin provided by Intellij. As soon as Intellij starts to download a plugin, it will also download the old log4j dependency.
You can reproduce the bug the following way:
1. Create a new Maven project and insert the following maven-compiler-plugin in the
pom.xml(any other plugin or version will result in the same behavior!)2. Make sure that the plugin is not available in your
.m2\repository\org\apache\maven\plugins\maven-compiler-plugin. Delete the plugin if it is already in the directory. Also make sure that there is no log4j version 1.2.12 in.m2\repository\log4j\log4j\1.2.123. In the Maven toolbar, click the “Reload All Maven Projects” button.
Maven will now download the
Maven-Compiler-Plugin, as well as thelog4j 1.2.12dependency to the.m2directory.4. Delete both packages again.
5. Go to Windows console, navigate to your project and build:
mvn package. Maven will not download the log4j package this time.So, under the IDEA environment the log4j package is downloaded, although there is no transitive dependency from the Maven Compiler to log4j.
I have provided logs & diagnostic data under this upload id: 2026_01_16_2BWMBFHwrETLYtxr1eKh4e
We tested this using IDEA 2025.3.1 Ultimate as well as 2025.1.1.1 Community
Hello Twanger
Thanks for the further investigation. I was able to reproduce the issue when creating a new project and can see that log4j 1.2.12 is added to the repository only after the project is created; in later attempts, the dependency is not downloaded.
I opened a new ticket with our support team. Please subscribe to it for further updates and upvote to increase visibility: IJPL-384832.