I solved this by selecting "Project" as view (by default i had "Project Files"). Hope this helped.
Project View VS. Project Files view
Answer from Luca on Stack OverflowWhy intelliJ doesn't show maven dependency as External dependencies and also shows red symbols even though the dependencies are downloaded - Stack Overflow
Dependencies from external website don't work. (Maven)
Intellij idea cannot resolve anything in maven - Stack Overflow
java - IntelliJ is not recognizing Maven Dependencies - Stack Overflow
Videos
I solved this by selecting "Project" as view (by default i had "Project Files"). Hope this helped.
Project View VS. Project Files view
I've had the same problem and narrowed it down to the following configuration that might have been messed up during the upgrade.
File (on Mac): ~/Library/Preferences/IntelliJIdea2018.1/options/projectView.xml
<application>
<component name="ProjectViewSharedSettings">
<option name="showLibraryContents" value="false" />
<option name="showMembers" value="true" />
</component>
</application>
Change/remove the showLibraryContents entry. This setting is no longer available in the UI, "External Libraries" are always shown.
Hello everybody, I'm trying to use a dependency from a github repository but I doesn't seem to work. Here is my dependencies section from pom.xml.
<dependencies>
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.17.1-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.github.Xezard</groupId>
<artifactId>XGlow</artifactId>
<version>{latest_version}</version>
</dependency>
</dependencies>It can't find the com.github.Xerard dependency but I added the .jar file to the libaries. How do I solve this?
IntelliJ seems to handle an Index for all dependencies inside the project. And this Index was not correctly handled in my case by IntelliJ.
But I found out that I can manually clear this cache/index by using following function:
File > Invalidate Caches / Restart...
I had the same problem. Right click on pom.xml -> maven-> Reload Project, Resolved my problem.
You are doing it right, libraries are configured in the Module Dependencies. Verify that the correct files were added there.
You should be able to browse inside the jars in the Project View under Libraries node. If you can't see the jars there, then your library is not configured properly. If you see the jars, but can't see classes inside of them, they are probably broken, replace them with the valid copies.
Also check that the libraries are added to the dependencies of the correct module where you try to import and use them. Verify the scope of the dependency, Compile is most likely what you need.
File | Invalidate Caches may help in case everything looks correct, but doesn't work.
If nothing helps, please share a sample project with the libraries to illustrate the issue.
I met this problem too, what i did is close current project and recreate/import the project and then import jars, and it works. I know its not wise ,but it's a direct and simple way. As i tried all the thing CRAZYCODER said but not work.
I am new to maven and I'm not sure if this is an intellij issue, maven issue or me not understanding them correctly.
I am trying to use a dependency:
<!-- https://mvnrepository.com/artifact/io.humble/humble-video-all -->
<dependency>
<groupId>io.humble</groupId>
<artifactId>humble-video-all</artifactId>
<version>0.2.1</version>
</dependency>It says not found. I see a list of artefacts I can at as dependencies but how to I get those not listed? Do I need to manually download the JAR files from maven repositories?
Thanks.