首先进入eclipse的maven配置界面Window》Preferences>Maven>User Settings
我新装的eclipse自带的Maven默认这个文件是不存在的,没关系,大家单击Browse新建文本文档,把文件名取为setting.xml然后把我下面的内容复制进去即可。
<?xmlversion="1.0"?><settings><localRepository>/home/yizhen/.m2/repository</localRepository><!--需要改成自己的maven的本地仓库地址--><mirrors><mirror><id>alimaven</id><name>aliyun maven</name><url>http://maven.aliyun.com/nexus/content/groups/public/</url><mirrorOf>central</mirrorOf></mirror></mirrors><profiles><profile><id>nexus</id><repositories><repository><id>nexus</id><name>local private nexus</name><url>http://maven.oschina.net/content/groups/public/</url><releases><enabled>true</enabled></releases><snapshots><enabled>false</enabled></snapshots></repository></repositories><pluginRepositories><pluginRepository><id>nexus</id><name>local private nexus</name><url>http://maven.oschina.net/content/groups/public/</url><releases><enabled>true</enabled></releases><snapshots><enabled>false</enabled></snapshots></pluginRepository></pluginRepositories></profile></profiles></settings>
然后保存,Update setting更新一下,接下来设置本地仓库,如果你没有现成的仓库就不需要设置了。
有固定maven本地仓库的同学将respsitory放在在C盘的USER的用户名下的m.2目录下即可,然后Reindex重新建立索引,Apply and Close 应用然后关闭即可!
全是木头的木星
大家学会了吗,以后再也不用担心maven下载类库时蜗牛一样的速度了,以后大家下载速度都要和图上的木星自身转速一样快,哇哇的!!
举报/反馈

很神很奇很神奇

6364获赞 1万粉丝
好听的音乐,好看的视频,请关注我
关注
0
0
收藏
分享