Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where could IntellijIDEA cache maven dependencies?

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.

like image 833
Martin Avatar asked Mar 18 '15 13:03

Martin


People also ask

Where is the Maven cache?

The first place that Maven looks for artifacts is in the local repository, which is the local cache where Maven stores all of the artifacts it has downloaded or found elsewhere. The default location of the local repository is the . m2/repository/ directory under the user's home directory.

Where can I find Maven dependencies?

In the POM, right-click anywhere in the editor to open the context menu and select Maven | Show Dependencies. Alternatively, press Ctrl+Alt+Shift+U or Ctrl+Alt+U . In the diagram window, IntelliJ IDEA displays the sub project and all its dependencies including the transitive ones.

How do I fix Maven dependency issues?

If the dependencies weren't imported correctly (IntelliJ IDEA highlights them), try to perform the following actions: You can check your local maven repository in the Maven | Repositories settings and try to update it. You can check the jar file of the local . m2 repository to see if it was downloaded correctly.

What does invalidate caches do?

Invalidate Cache clears project structure related information (only) cached by Android studio.


2 Answers

...\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.

like image 79
Meo Avatar answered Oct 21 '22 14:10

Meo


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.

like image 45
Jose Quijada Avatar answered Oct 21 '22 15:10

Jose Quijada