IDEA project doesn't get indexed to existing .m2 repository

Answered

When I try to load old projects in IntelliJ IDEA, all my imports and libraries show "Unresolved". I have all the required dependencies in .m2/repository already, but they are not getting indexed. I tried deleting ".m2/repository" folder, only few dependencies get downloaded and stops abruptly. I tried creating a new project and added dependencies one by one, they don't download. 

Kindly suggest what might have gone wrong here.

0
4 comments

Try to reimport Maven project. Does it help? https://i.imgur.com/Cz3YUon.png

0

@Konstantin Annikov
I have tried reimporting and also by deleting the local .m2/repository folder. The repository folder get recreated with few dependency sub folders and abruptly stops. My environment did not change for many months, so guess its not a proxy or connectivity issue. I load many maven projects on my IDEA, can this cause my IDEA settings go wrong?

0

One observation is when i changed by work mode as Offline, indexing worked with existing repository and dependencies resolved. In online mode neither indexing happens nor downloads the dependencies.

0

Can you build project by Maven from command line?

>I tried creating a new project and added dependencies one by one, they don't download.

Are there any errors shown when dependencies can not be downloaded? Please provide idea.log (Help | Show Log in ... action) file after IDE restart and reproducing.

Please also provide screenshots of Maven and Maven | Importing settings pages and the content of path.macros.xml file, located in <IDE config>/options directory.

For uploading you can use https://uploads.services.jetbrains.com or any file sharing service.

0

Please sign in to leave a comment.