Sandeep
Sandeep

Reputation: 586

maven dependency should pick jar from local repository

I have a requirement for my MAVEN build to pick a single jar from my local repository. This jar (in context) is also available in my central repository.

can someone suggest what has to be done in pom.xml? appreciate quick help !

Upvotes: 1

Views: 1117

Answers (2)

Raghuram
Raghuram

Reputation: 52665

Hope you have a valid reason to do this since this is not a normal scenario.

You could use a different groupId and/or artifactId to distinguish your jar from the central one. Alternately you could install the local jar with a classifier to distinguish it from the central jar.

Upvotes: 4

John Watts
John Watts

Reputation: 8885

Rename the version you depend on be different from the one in the central repository. Put that version in your local repository.

Upvotes: 2

Related Questions