Reputation: 16271
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:
\username\maven\repository
(custom)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
Artifactory
to reuse the Maven's repository according with the settings.xml
's <localRepository>
value?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
settings.xml
file to refer the remote Artifactory
?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
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