且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何配置Maven进行离线开发?

更新时间:2023-09-18 11:23:58

您可以在离线模式下运行 maven mvn -o install.当然,本地存储库中不可用的任何工件都将失败.Maven 不是基于分布式存储库,但它们确实使事情变得更加无缝.出于这个原因,许多商店使用与中间存储库增量同步的内部镜像.

You can run maven in offline mode mvn -o install. Of course any artifacts not available in your local repository will fail. Maven is not predicated on distributed repositories, but they certainly make things more seamless. Its for this reason that many shops use internal mirrors that are incrementally synced with the central repos.

此外,mvn dependency:go-offline 可用于确保您在开始离线工作之前已在本地安装所有依赖项.

In addition, the mvn dependency:go-offline can be used to ensure you have all of your dependencies installed locally before you begin to work offline.