The "correct" approach for working with maven in a secure corporate setting was to install the repo mirror, fill it with all the banks you need, and then add it to your ~ / .m2 / settings.xml file to mirror everything.
<settings> <mirrors> <mirror> <id>archiva.default</id> <url>http://my.mirror.com:8080/archiva/repository/internal</url> <mirrorOf>*</mirrorOf> </mirror> </mirrors> </settings>
This is a lot of work, although it can pay off in the long run, because you can use the internal mirror for subsequent projects (and speed up the download)
copying the working directory .m2 is also a respectable hack
source share