Running Intellij IDEA code does not imply classes coming from maven dependencies

This may sound silly, but here I go (there are no silly questions at all, right?): I work on the JAVA Maven module with IntelliJ IDEA, and the code completion function works fine, offering classes from both my module and the JDK.

However, the code completion function does not seem to know the classes coming from the Maven dependencies on which my module depends.

For example, my module depends on Maven dependencies such as joda-time. The code completion popup does not offer classes such as LocalDate.

Here is my code completion configuration:

code-completion-configuration

What am I missing? Thanks in advance.

+8
source share
2 answers

Found a solution:

1 ° Click File> Invalid Caches / Reboot 2 ° Select Invalidate and Restart 3 ° After restarting IntelliJ indexes from scratch and completing the code, it works like a charm.

+10
source

Intellij right top

If it is a Gradle or Maven project. As shown in the figure, you may need to import the build.gradle project file if Gradle, or the maven bom.xml file if Maven. It synchronizes your project and can download the necessary files from the Gradle or Maven server.

@SenzMate Iot Intelligence

0
source

Source: https://habr.com/ru/post/985422/


All Articles