Eclipse搭建Maven环境

来源:互联网 发布:时间加权平均价格算法 编辑:程序博客网 时间:2024/05/20 20:47
  • 首先下载Maven插件且解压到指定目录
配置Maven本地仓库的位置:
  • 打开Maven解压目录 - >conf -> settings.xml
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">    <localRepository>本地仓库的位置</localRepository></settings>
Eclipse添加Maven插件:
  • Window -> Preferences -> Maven -> Installations -> Add -> Directory ++选择Maven解压的目录++ -> Finish

这里写图片描述这里写图片描述

  • 把添加的Maven选择为默认
  • Window -> Preferences -> Maven -> User Settings -> Browse ->选择settings.xml
    这里写图片描述
原创粉丝点击