Manuel Jordan
Manuel Jordan

Reputation: 16271

How configure in a master machine Artifactory to reuse the repository location defined in Maven's settings.xml file?

I have a LAN, where each developer machine has Maven installed and of course each one has its own repository defined through the settings.xml file through the <localRepository> section, for example:

It how a generic way, it without matter if the OS is either Linux, Mac, or Windows

The goal is have just one machine in the LAN to let access to its own repository for the other machines in the same LAN, it of course to let them refer the dependencies as they need or request through their projects. Therefore as follows:

* Developer Master [central repository in the LAN]
* Developer Alpha
* Developer Beta
* Developer Delta

Therefore Alpha, Beta, Delta are dependent developer machines - since now referred as DDM. These DDM should get access to the dependencies available by Master, is important to do not download or make a copy of those jars dependencies from the master to themselves - just refer them; therefore the purpose is save space about hard disk in these DDM. And if in some project from these DDM is declared a new dependency through a pom.xml file should be downloaded into the master and be accessible to all the rest DDM too.

I did a research about this, and I found something about to work through a shared remote directory, but according with the answers and comments, it is not safe about synchronization. Many of them suggested Nexus and Artifactory.

I installed

I need manage these scenarios through step instructions (of course if is possible):

Question 1: in the Master

Therefore these DDM are acceding to that <localRepository> location through Artifactory and not directly through a shared remote directory where anytime can arise issues about synchronization.

Question 2: in each DDM

Therefore, it with the purpose to avoid to configure each pom.xml file for each project in the DDM. It would be verbose.

I did do a research in youtube and official JFrog documentation and had not luck.

Goal: having in the Master Machine the Maven repository directory with dependencies about Spring, JUnit 5, Hibernate and others, they should be available for all the DDM through Artifactory

Upvotes: 0

Views: 47

Answers (1)

J Fabian Meier
J Fabian Meier

Reputation: 35795

Not possible.

Each user needs their own separate local repository.

It is useful to have Artifactory to draw the artifacts from there, but in the end, the need to be copied to the developer's local repository before use.

Upvotes: 1

Related Questions