Maven repository only Local

1

happens that I am using maven, I have 1 repository configured in my pom file, so that in case any dependency is not found in my M2, I look for it in that repository, but it happens to me that, although I have added the jar in my M2, maven does not look for them and direct is going to look for a repository outside the premises.

Config in pom for repository:

<repositories>
    <repository>
      <id>xxxxx</id>
      <name>archiva</name>      
      <url>http://xx.xx.xx.xx/repository/internal/</url>
    </repository>
  </repositories> 

Do you know a way to prevent maven from looking in another repository other than the local m2?

    
asked by Ventur 04.06.2016 в 00:05
source

1 answer

1

You can use the -o option that refers to offline , this will force maven to search the dependencies only in the local repository. Example:

mvn clean install -o
    
answered by 24.03.2017 / 00:40
source