Cloud He
Cloud He

Reputation: 39

How to force Maven only go to local repository to look for dependencies?

I am taking over a maven project from my former colleage's hand. Even there is a nexus configed in the settings.xml, but the url is already invalid. Now all the dependencies that this project needs are in the local repository on my hard drive(I went check and there are).

The problem is pom.xml still says miss some artifacts or dependencies, and everytime I run maven command try to clean or update or re-compile or re-build, maven went to that nexus url to download dependencies and fail...

This cost me a whole day and drove me crazy. Why does't maven just go to local repository to look for dependencies??? There are all in there!!

Upvotes: 1

Views: 3432

Answers (1)

khmarbaise
khmarbaise

Reputation: 97349

You can try to work offline via:

  mvn --offline ...

But i would expect that there is something else wrong.

Upvotes: 3

Related Questions