How do I prevent Maven 2 from searching remote repositories for specific dependencies that are in the local repository only?
Maven just goes through the list and looks into all the repositories. It is not possible to tie dependencies to special repositories.
We can use -U/--update-snapshots flag when building a maven project to force maven to download dependencies from the remote repository. Here, -U,--update-snapshots : Forces a check for missing releases and updated snapshots on remote repositories.
To clear/delete your local maven repository cache, simply delete the . m2/repository folder.
How do I prevent Maven 2 from searching remote repositories for specific depedencies that are in the local repository only
Well, actually, Maven won't unless:
.pom
file in which case you can provide it or generate it (see questions below).If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With