Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IntelliJ IDEA: “Indexed Maven Repositories” list - how to REMOVE a remote maven repository in this list?

I really wanted this to be a comment to the answer posted in the thread IntelliJ IDEA: "Indexed Maven Repositories" list - how to add remote maven repository in this list? but my reputation does not allow for it. So please excuse this being posted as a new Question.

Is there any way to remove a repository from the "Indexed Maven Repositories" list? I moved projects and still see my old repositories in there, some of which have actually been taken offline.

I have tried re-importing my settings.xml file, restarting IntelliJ multiple times(invalidating the cache too), but cannot get those repositories to go away from this list.

like image 327
Jatin Avatar asked May 02 '12 20:05

Jatin


2 Answers

All my repositories got removed from this list, probably because I've moved the project to another directory on my device. My solution was to delete the jarRepositories.xml file, which is located inside the .idea folder.

like image 78
AUser Avatar answered Sep 21 '22 00:09

AUser


In my case the "indexed maven repository" I wanted to remove wasn't defined in Maven's settings.xml, but was defined inside one of my many sub-project's pom.xml file. I had to delete the following section from a pom.xml file. After deleting that from the pom.xml file the "indexed maven repository" was removed from Maven's settings in IntelliJ

<repositories>
    <repository>
        <id>foo</id>
        <name>foo</name>
        <url>file://${project.basedir}/maven/repository</url>
    </repository>
</repositories>
like image 36
HairOfTheDog Avatar answered Sep 21 '22 00:09

HairOfTheDog