如何配置Maven进行离线开发? [英] How do I configure Maven for offline development?

查看:294
本文介绍了如何配置Maven进行离线开发?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

maven是否需要在某些时候连接到互联网才能使用它?具体意义是获取用于编译,清洁,包装等的内部maven插件?

Does maven require a connection to the internet at some point to be able to use it? Meaning specifically getting the internal maven plugins for compiling, cleaning, packaging, etc?

推荐答案

您可以在离线模式下运行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依赖关系: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.

这篇关于如何配置Maven进行离线开发?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆