java - Maven3 can't find artifacts when switching repository settings -


i'm running think catch-22 situation way settings.xml file set up.

currently, when i'm in office, use our nexus our principal source. repos mirrored nexus, , nexus, in turn, proxy central. works fine. able download artifacts central, , local nexus.

however, when out of office, no longer have access nexus server. changed settings.xml file disable mirror central. however, maven complains unable find local artifacts hosted on nexus though exist in local m2 repo.

i know maven 3 tracks location artifact downloaded _maven.repositories file (see this post other resources). however, not sure how supposed configure issue such can move around this.

when out of office, don't have access nexus, want continue using local repo artifacts cached. not want turn maven offline altogether need d/l other artifacts central continue working.

settings.xml when @ office

   <mirrors>         <mirror>             <id>nexus</id>             <mirrorof>*</mirrorof>             <url>https://nexus.local/nexus/content/groups/public/</url>         </mirror>     </mirrors> 

settings.xml when out of office:

  <mirrors>         <mirror>             <id>nexus</id>             <mirrorof>*,!central</mirrorof>             <url>https://nexus.local/nexus/content/groups/public/</url>         </mirror>     </mirrors> 

should mirror configured differently? there better way set up? realize can delete _maven.repositories file, not particularly practical nor, i'm sure, advisable.


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -