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.

 

3 comments
Comment actions Permalink

Hi. Could you please provide a project example?

0
Comment actions Permalink

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.

0
Comment actions Permalink

Does it help if you invalidate caches (File | Invalidate cache) or reimport the project?

0

Please sign in to leave a comment.