Reputation: 24679
I would like to avoid using a full-fledged component repository such as Nexus/Artifactory as remote repository and use a mapped Windows drive instead with such:
\\drive\path\to\repository\
I am not sure how to proceed. Do I need the Wagon plugin for that?
Ideally, I would need to leave the POMs alone and modify the settings.xml
only. Is this possible?
Upvotes: 3
Views: 1505
Reputation: 3696
Yes you can add mirrors to your settings file and it accepts other protocols than http. It is recommended to use file://. I tried this and it worked
<settings>
<mirrors>
<mirror>
<id>mac</id>
<url>file:////server/folder/etc/</url>
<mirrorOf>*</mirrorOf>
</mirror>
</mirrors>
</settings>
Upvotes: 0
Reputation: 9480
Just add the path to your settings.xml to use a remote file system as your local repository instead of under your .m2 directory:
<localRepository>\\drive\path\to\repository\</localRepository>
Of course, this will slow down your builds considerably, and if others are also sharing it, then you will find builds failing due to conflicts when multiple users access the build artifacts simultaneously.
Are you sure it's worth it when it would probably take less than an hour to set up a proper proxy/repository?
Upvotes: 0