title: How to add Nexus repository index in IntelliJ IDEA?
body: <p>We managed our maven repository using Sonatype Nexus, and in the ~.m2\setting.xml, set</p>
  
  <pre><code>&lt;mirrorOf&gt;*&lt;/mirrorOf&gt;
  </code></pre>
  
  <p>to our Nexus repository.</p>
  
  <p>In IntelliJ IDEA "Settings-->Maven-->Repositories-->Indexed Maven repositories", there are one local repository and one remote central repository "<a href="http://repo1.maven.org/maven2">http://repo1.maven.org/maven2</a>". However, there seems to be no way to index Nexus repository.</p>
  
  <p>Without the index, I can't use the "Maven Artifact Search" inside IntelliJ IDEA, instead I have to search it in Nexus website, and then copy the dependency to the pom.xml, which is not quite convenient.</p>
  
  <p>Can anybody tell me how to add Nexus repository index in IntelliJ IDEA, so that I can search artifacts inside IDEA?</p>
  
  <p>below is my settings.xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" 
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
            xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"&gt;
  
    &lt;mirrors&gt;
      &lt;mirror&gt;
        &lt;id&gt;nexus&lt;/id&gt;
        &lt;mirrorOf&gt;*&lt;/mirrorOf&gt;
        &lt;name&gt;My repository&lt;/name&gt;
        &lt;url&gt;http://1.2.3.4:8081/nexus/content/groups/public&lt;/url&gt;
      &lt;/mirror&gt;
    &lt;/mirrors&gt;
  
    &lt;profiles&gt;
      &lt;profile&gt;
        &lt;id&gt;nexus&lt;/id&gt;
        &lt;repositories&gt;
          &lt;repository&gt;
            &lt;id&gt;central&lt;/id&gt;
            &lt;name&gt;My repository&lt;/name&gt;
            &lt;url&gt;http://repo1.maven.org/maven2&lt;/url&gt;
            &lt;layout&gt;default&lt;/layout&gt;
            &lt;releases&gt;
              &lt;enabled&gt;true&lt;/enabled&gt;
              &lt;updatePolicy&gt;always&lt;/updatePolicy&gt;
              &lt;checksumPolicy&gt;warn&lt;/checksumPolicy&gt;
            &lt;/releases&gt;
            &lt;snapshots&gt;
              &lt;enabled&gt;true&lt;/enabled&gt;
              &lt;updatePolicy&gt;never&lt;/updatePolicy&gt;
              &lt;checksumPolicy&gt;fail&lt;/checksumPolicy&gt;
            &lt;/snapshots&gt;
          &lt;/repository&gt;
        &lt;/repositories&gt;
        &lt;pluginRepositories&gt;
          &lt;pluginRepository&gt;
            &lt;id&gt;central&lt;/id&gt;
            &lt;url&gt;http://repo1.maven.org/maven2&lt;/url&gt;
            &lt;releases&gt;
              &lt;enabled&gt;true&lt;/enabled&gt;
              &lt;updatePolicy&gt;always&lt;/updatePolicy&gt;
              &lt;checksumPolicy&gt;warn&lt;/checksumPolicy&gt;
            &lt;/releases&gt;
            &lt;snapshots&gt;
              &lt;enabled&gt;true&lt;/enabled&gt;
              &lt;updatePolicy&gt;never&lt;/updatePolicy&gt;
              &lt;checksumPolicy&gt;fail&lt;/checksumPolicy&gt;
            &lt;/snapshots&gt;
          &lt;/pluginRepository&gt;
        &lt;/pluginRepositories&gt;
      &lt;/profile&gt;
    &lt;/profiles&gt;
  
    &lt;activeProfiles&gt;
      &lt;activeProfile&gt;nexus&lt;/activeProfile&gt;
    &lt;/activeProfiles&gt;
  &lt;/settings&gt;
  </code></pre>