0

即使使用 ../.m2/setting.xml 文件中的代理设置,也无法访问 maven 中央存储库。被告知必须使用本地存储库。想知道由于这个限制,什么是构建和使用本地存储库的好方法,从而有效地使用 Maven?

4

1 回答 1

4

You (or your admin) can have your local repo mirror the central repo and set your settings.xml file to use your local repo as the mirror for everything (see the Nexus repo documentation for what to put in your settings.xml). When you build, maven will attempt to pull all resources from your local repo; if they're not there, your repo will automatically pull them from central and store them. The next time you build, all artifacts will come from your local repo and not central.

于 2012-06-05T18:40:41.453 回答