Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maven Artifact Search is always empty

When using Alt-Insert to insert a dependency into the POM, the Artifact Search is always completely blank regardless of what I search for.

I tried to add repo1 to Settings->Maven->Repository Services, it says "no repository found." I find that hard to believe.

I've also tried to "update" my local repository but that results in an error.

FYI I'm using Community Edition Snapshot.

Thanks!

like image 905
Dan Billings Avatar asked Oct 21 '10 17:10

Dan Billings


People also ask

How do I open maven artifact search in IntelliJ?

In the POM, right-click anywhere in the editor to open the context menu and select Maven | Show Dependencies. Alternatively, press Ctrl+Alt+Shift+U or Ctrl+Alt+U . In the diagram window, IntelliJ IDEA displays the sub project and all its dependencies including the transitive ones.

Why maven dependencies are not showing in IntelliJ?

If the dependencies weren't imported correctly (IntelliJ IDEA highlights them), try to perform the following actions: You can check your local maven repository in the Maven | Repositories settings and try to update it. You can check the jar file of the local . m2 repository to see if it was downloaded correctly.


2 Answers

If you have a brand new IntelliJ install and have never updated your Maven Repository, notice that there is a little "Update" button to the right that becomes clickable when you click on each repository.

Preferences > Build, Execution, Deployment > Build Tools > Maven > Repositories

The important one is the https://repo.maven.apache.org/maven2/ remote repository, make sure you update it.

like image 99
Tiamot Avatar answered Oct 15 '22 12:10

Tiamot


I used Artifactory to generate a settings.xml for me, and by default it pointed me to the "libs-releases" repository.

Instead want my "releases" repository to point to the much larger virtual repository "remote-repos."

All it took was a simple change to the options of the "Generate Settings" function. Need to change the "Releases" repository to a big one.  We can use "Snapshots to point to our own builds"

like image 41
Dan Billings Avatar answered Oct 15 '22 14:10

Dan Billings