maven简单了解
本地仓库:用来存储远程仓库货中央仓库下载的插件和jar包,项目使用一些插件或jar包,优先从本地仓库查找。
远程仓库:如果本地需要插件或者jar包,本地仓库没有,默认去远程仓库下载。
中央仓库:在maven环境内部内置一个远程仓库地址http://repo1.maven.org/maven2,它是中央仓库,服务于整个互联网,它是由maven自己维护,里面有大量的常用类库,并包含该了世界上大部分流行的开源项目构件。
一、打开maven官网并下载
https://maven.apache.org/download.cgi
如图

二、解压到你想放到的位置
得到这么个文件

三、配置环境变量
先新建个MABEN_HOME

然后配置path

在cmd窗口测试是否成功
如下就是可以了。

四、maven的其他额外配置
1.指定本地仓库
新建个文件夹做为本地仓库,在哪都可以。

然后打开


2.指定中央仓库
同样是刚才的文件
<mirror>
<id>alimaven</id>
<mirrorOf>*</mirrorOf>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/repositories/central/</url>
/mirror>

国内加载速度就非常快了,用原生的有时候急死人。
网友评论