Problems with importing Maven libraries 2021.2.4 CE
Answered
Project Strucuture -> Global Libraries -> "+" -> "From Maven..."
Type "com.github.scribejava" and search.
This only return the latest version as 6.3.0, but the repository has the latest version as 8.3.1
Maven repository is maven.apache.org
Please help.
Please sign in to leave a comment.
Please try to update indexes for Maven repositories in the Settings (Preferences on macOS) | Build, Execution, Deployment | Build Tools | Maven | Repositories settings.
Please vote for a related requests: https://youtrack.jetbrains.com/issue/IDEA-143434 https://youtrack.jetbrains.com/issue/IDEA-197739
It worked for me with this search string:
I can see that the issue IDEA-143434 has the same issue as I have encountered. The root cause is that the Maven Jar Repository "https://repo1.maven.org/maven2" is not searced, as it is not indexed. Hence IJ is looking for the repository in Nexus which has not been updated.
I can re-index the repository as it does not show up in "Indexed Maven Repositories".
If I delete all the "artifactory or Nexus Services URL's", nothing works, and the next time I restart intellij it will populate the screen with the defaults.
Just to add that I am not using pom's or anything else, it is just pure intellij with a fairly large codebase which has been in development since 2012. However, I have had to move the development environment from a MAC M1 to a PC due to Apple idioxxxxx
Any help would be greatly appreciated.
I mean I can not "update" the index for the repository as it is not listed in the repository dialog box.
As posted in a previous email, I have been asked only to rely on Maven dependencies, otherwise life would be easy
>I mean I can not "update" the index for the repository as it is not listed in the repository dialog box.
IDE adds repositories to Maven | Repositories only if this repository is used in this Maven/Gradle project settings. If the project is not Maven/Gradle based, one could add repositories in Remote Jar Repositories. For those repositories IDE uses online search, but it could be slow. Please see https://youtrack.jetbrains.com/issue/IDEA-197739#focus=Comments-27-3038288.0-0
Hi Andrey,
Yes, as in the previosly attached picture ,the repository is added (it is the default), but it is not searched nor indexed. Hence the lookup is only done from the artifactory URL's which has been depreciated. Hence there seems to be a bug that if the "Artifactory" URL's are all removed, then nothing happens. And .. If only the default "Maven Jar Repository" is included, it will not be searched either. If a package has been downloaded, then it is listed in the "Indexed Maven Repositories", but as a "local" copy. As attached below. Hence I will need to try to manually configure an "Indexed Maven Repository" with Type "Remote" or copy the entire Maven repositoy into .m2.
I know the root cause may be that IJ needs to be a Maven project in order to look up.
I don't really care if the lookup is slow, as long as it is working from the right repository.
Thank you for the pointers. I think this "feature" has been around for a while, but has only become annoying as the standard "Artifactory" repositories is no longer up to date.
Hmmm.