Maven project dependency stated as "not found" in pom file view, but is clearly found on build.

Answered

I'm having this recurring problem where I update a version of a dependency in my project pom file and the items will go red as if it's not found (although it has been installed to my local repo), and when I build the project it does find it and pull it in as a dependency to the project, however the version specified in the dependency block e.g., 

 

I've been able to "fix" this sometimes by invalidating the intellij cache, but above is an example where this isn't the case, it won't resolve in the file view.

 

1
5 comments

https://youtrack.jetbrains.com/issue/IDEA-221441 looks related. Does it happen in 2019.2.1 IntelliJ IDEA version?

1

Yep, looks like that's the fix. Thanks!

0

Hi, I still face this problem with several versions I have tested after 2019.2.1

I am working with intellij 2023.1.3 now any suggestions please ? Thanks

0

Does it help to clear the cache at   File | Invalidate Caches | Invalidate and Restart? If not, please create a new support request.

0

Invalidate and restart didn't bring any changes. I am wondering if it's intellij issue or windows firewall. I will create a new support ticket.

As a workround I used maven command mvn clean install -U to force resolving dependencies but it's important that intellij should handle that automatically.

Thank you

0

Please sign in to leave a comment.