IntelliJ can't find library but it works fine when compiling at terminal
Answered
I used 'mvn clean install' and can't compile a project without any issue. But when working within IntelliJ, it reports it can't find a dependency. What's the issue?
Please see the two attachment. The 'deeplearning' is the dependency it's complaining. As you can see, it can be found in the "External libraries" in the panel in IntelliJ. But in the code editor, it has lots of red flags.


Please sign in to leave a comment.
Hi. Could you please provide a project example?
It runs all well in both terminal and in IntelliJ, but the only issue is the annoying red flag error in the source code. I can't give you the whole project, but I can generate a dependency tree for you to look at. I tested the same project in Eclipse, it doesn't report any error.
Does it help if you invalidate caches (File | Invalidate cache) or reimport the project?