如何设置maven的local repository目录

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了如何设置maven的local repository目录相关的知识,希望对你有一定的参考价值。

参考技术A step1:默认会放在~/.m2/repository目录下
(“~”代表用户的目录,比如windows下一般都是c:\documents
and
settings\[你的用户名]\。由于“documents
and
settings”中含有“空格”会导致“illegal
character
in
path”异常)
安装maven后我们会在用户目录下发现.m2
文件夹。默认情况下,该文件夹下放置了maven本地仓库.m2/repository。所有的maven构件(artifact)都被存储到该仓库中,以方便重用。

maven 不支持http

maven             allowInsecureProtocol true            url 'http://maven.xxx.com/repositor

添加 allowInsecureProtocol  true 可以暂时先不支持https

以上是关于如何设置maven的local repository目录的主要内容,如果未能解决你的问题,请参考以下文章

maven 不支持http

Maven快速入门--Idea版

理解Maven核心概念

spring config server- 用于本地 git 存储库

Maven远程仓库的各种配置

在 maven-install-plugin 上保留 maven 工件名称(默认安装)