James Black
James Black

Reputation: 41858

How to stop maven from downloading some jar files from repositorty

I am modifying the hadoop source code but when I do a compile in maven it downloads from the maven repository, which is causing problems as my changes are not always be used.

How can I get maven to not download some files from the repository at all, and just use what is in the local classpath?

I am using maven 3.0.4

Upvotes: 2

Views: 504

Answers (2)

SoftwareCarpenter
SoftwareCarpenter

Reputation: 3923

Update these properties inside of your POM file to disable updates of your dependencies.

  • enabled: true or false for whether this repository is enabled for the respective type (releases or snapshots).

  • updatePolicy: This element specifies how often updates should attempt to occur. Maven will compare the local POM's timestamp (stored in a repository's maven-metadata file) to the remote. The choices are: always, daily (default), interval:X (where X is an integer in minutes) or never.

POM Reference - MAVEN Site

Upvotes: 1

venergiac
venergiac

Reputation: 7697

The best way is to give to "hadoop source code" a different SNAPSHOT version or a different artifactId and refer to it.

However, I think it is a stupid answer.

Upvotes: 2

Related Questions