Reputation: 3661
I have installed an artifact successfully into my local maven repository.
How do I add a dependency to this artifact in a second client maven project?
What would the POM file of the client look like?
Upvotes: 1
Views: 64
Reputation: 7196
It would be same as other dependency you are providing.
Let say you first project groupId is A.B.C.D ,artifactId is XYZ and version is 1.0,Then you just need to declare below line in the dependencies section of your second maven project,Maven will automatically find it from local repository.
<dependency>
<groupId>A.B.C.D</groupId>
<artifactId>XYZ</artifactId>
<version>1.0</version>
</dependency>
Upvotes: 1