Where could IntellijIDEA cache maven dependencies?
Asked Answered
C

8

9

For some of my modules Intellij IDEA is not importing the dependencies and plugins. Just the live cycle is imported.

Maven Projects

The poms are valid as I compile on the command line. I have deleted the modules and reimported them. I deleted the project them and re-imported it.

So I wonder if there is some secret cache where Intellij IDEA informations on modules even after they are deleted.

Or if there is any other reason why Intellij IDEA might not be able to import dependencies and plugins.

UPDATE:

Found this interesting error message:

enter image description here

I don't use apache commons. Must be an Intellij IDEA problem. Maybe it is time for a bug report.

Cragsman answered 18/3, 2015 at 13:45 Comment(0)
P
7

...\home\.IntelliJIdea14\system\Maven - cache for maven artifacts, you can probably delete it.

Module and project informations are stored within the project - .idea folder and *.ipr and *.iml files, you can delete them to be sure and reimport the project.

Sometimes Main Menu | File | Invalidate caches might help.

Polio answered 18/3, 2015 at 13:48 Comment(1)
Deleted .IntelliJIdea14\system\Maven — that did not help, just took a lot of time to be recreated. I have no *.ipr files anywhere. So they can't be the problem. I can fix the *.iml files (for example with mvn idea:idea) but it won't fix the maven projects as shown in the screen shot. I have to continue looking. Or better: with the fixed *.iml I do something productive.Cragsman
L
5

I was having an issue where IntelliJ would show compilation issues in some classes, even though running a full mvn clean install from the command line would run successfully with no errors whatsoever.

The solution for me as suggested here was to invalidate the cache and restart. I picked an option to both invalidate cache and restart.

Lovellalovelock answered 7/1, 2018 at 23:37 Comment(0)
C
1

It went away today. Just after I fitted an 8GB memory modules to the computer. So it might have been an silent out of memory condition.

Cragsman answered 26/3, 2015 at 12:33 Comment(0)
O
1

hack: Edit your .pom file - it will trigger repo reread. a space after version will do.

Osvaldooswal answered 4/10, 2017 at 15:3 Comment(0)
K
1

What worked for me is going to project setup and delete the dependencies from Libraries in Project Structure (Right Click Project > Open Module Settings > Project Settings > Libraries).

Kalpak answered 10/1, 2022 at 13:59 Comment(0)
W
0

I had unresolved maven dependencies within IntelliJ for so long and it wont resolve by any means including Invalidating Cache and Restarting or deleting Maven folder within .Idea installation of machine located in system's user's account. So eventually I had to delete the system folder located within .idea folder of the project.

It did clean my maven dependencies, resolved them again, but also erased the settings of my IntelliJ setup, so had to set Java, Maven, everything up from scratch, but it did work for me.

Even if you face some issues on Run Configurations, just build the project/module and restart the Run Configuration, that should work.

Wilding answered 3/2, 2021 at 21:20 Comment(0)
C
0

I had slightly the same issue when working with multiple project in InteliJ IDEA.

IntelliJ IDEA caches considerable amount of files for all projects that you have ever worked with in the IDE, hence the system cache may become overloaded.

These steps helped me to fix the issue:

Reimport Dependencies in pom.xml in the module.

IDE to invalidate cache:

  1. From the main menu, select File | Invalidate Caches.

  2. In the Invalidate Caches dialog, Click Invalidate and Restart.

If you click Just restart, cache files won't be deleted.

After the IDE restart follow the steps:

  1. Right Click the Module/ Project
  2. Click Maven Option and Select Reimport option
Cranston answered 4/5, 2022 at 6:40 Comment(0)
A
0

On Windows also clear C:\Users\<USER ACCOUNT NAME>\.gradle\caches

Armored answered 2/9 at 13:31 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.