Monday, 30 January 2017

Adding a private/ multiple repositories into pom.xml

Now a days most of the companies are implementing utilities and converting them into jar files and maintaining in the company repositories (similar to maven repo which is private)

As part of the framework, we might need to use Maven and our Private repo for dependency management.
Here is the solution for the problem.

In pom.xml, add below code.
<repositories>
    <repository>
      <id>my-priavte-repo1</id>
      <name>My comapny private repositiy</name>
      <url>http://MyComapanyName.ProjectName.Extension</url>
    </repository>    
</repositories>

Then adding dependencies is similar to Maven.


That’s all.

No comments:

Post a Comment