Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Force maven to look for dependency in local repository

Tags:

I have 4 snapshot dependencies in my Pom and I want to force just 1 dependency to be looked always from local repository only. Is it possible to define in that dependency only that it should be fetched from local?

like image 864
Raman Avatar asked Apr 30 '13 20:04

Raman


People also ask

Why is Maven not checking local repository?

Maven first checks the local repository, and if it can't find a dependency there, it checks each configured repository one by one until it finds it. Maven Central is configured by default, but you can also configure other repositories.

Where does Maven look for local dependencies?

Maven searches for the dependencies in the following order: Local repository then Central repository then Remote repository. If dependency is not found in these repositories, maven stops processing and throws an error.


1 Answers

force maven to run in offline mode by passing -o switch

like image 140
jmj Avatar answered Oct 23 '22 10:10

jmj