3

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?

balteo
  • 23,602
  • 63
  • 219
  • 412

2 Answers2

0

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?

Steve
  • 9,270
  • 5
  • 47
  • 61
  • 1
    Thanks Steve. The thing is that I want the **local** repositories to remain on the developpers' machines. It is actually the **remote** component repositories that I would like to be located on a windows drive somehow perhaps using the file: protocol... My management does not want a "proper" Nexus/artifactory for now unfortunately. Do you see my point? – balteo Feb 17 '14 at 12:03
  • 1
    I'm not sure that there's much of an alternative. I suspect you would be better of explaining that Nexus and Artifactory are repository proxies, not just file storage. Otherwise, you're going to expend more effort trying to configure a poor alternative than if you just set up Nexus/Artifactory. – Steve Feb 17 '14 at 12:17
0

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>
Konstantin
  • 3,626
  • 2
  • 33
  • 45