How to add repository/repositories to "Indexed Maven Repositories" in IntelliJ IDEA 13?

            Asked
            
        
        
            Active
            
        
            Viewed 7,523 times
        
    3
            
            
        
        Vy Do
        
- 46,709
 - 59
 - 215
 - 313
 
- 
                    Possible Duplicate:http://stackoverflow.com/questions/8150535/intellij-idea-indexed-maven-repositories-list-how-to-add-remote-maven-repos – seenukarthi Sep 28 '14 at 09:59
 - 
                    It isn't duplicated, I have been read this. – Vy Do Sep 28 '14 at 10:04
 - 
                    Do you read red text: "Nothing at here!" on screenshot? – Vy Do Sep 28 '14 at 10:09
 
2 Answers
2
            Create a simple Maven project by IntelliJ IDEA:



Choose "Enable Auto-Import"

Then, add these to pom.xml:
<repositories>
    <repository>
        <id>codehausSnapshots</id>
        <name>Codehaus Snapshots</name>
        <releases>
            <enabled>false</enabled>
            <updatePolicy>always</updatePolicy>
            <checksumPolicy>warn</checksumPolicy>
        </releases>
        <snapshots>
            <enabled>true</enabled>
            <updatePolicy>never</updatePolicy>
            <checksumPolicy>fail</checksumPolicy>
        </snapshots>
        <url>http://snapshots.maven.codehaus.org/maven2</url>
        <layout>default</layout>
    </repository>
</repositories>
Come back to Settings (Ctrl + Alt + S), "Indexed Maven Repositories" section updated:

        Vy Do
        
- 46,709
 - 59
 - 215
 - 313
 
-2
            
            
        Add this repisitory to settings.xml in maven:
<project> 
  <repositories> 
        <repository>
            <id>my-internal-site</id> 
            <url>http://myserver/repo</url> 
         </repository> 
     </repositories> 
 </project>
        walkeros
        
- 4,736
 - 4
 - 35
 - 47
 
- 
                    tag should not be used in settings.xml, use it in pom's project instead. In settings.xml to set a repo you should put it inside
tag https://maven.apache.org/guides/mini/guide-multiple-repositories.html – demian Jun 27 '19 at 16:29