今天将Eclipse关于Maven的配置总结一下,方便以后配置。

一.配置Maven环境

1.下载apache-maven文件,选择自己需要的版本,地址:http://mirrors.cnnic.cn/apache/maven/maven-3/3.2.3/binaries/apache-maven-3.2.3-bin.zip

2.解压1所下载文件,本人解压到:D:\Software_IDE\apache-maven-3.0.4

3.配置Maven环境变量

a. MAVEN_HOME:D:\Software_IDE\apache-maven-3.0.4

b.PATH:%MAVEN_HOME%\bin;

4.在CMD中输入mvn -v,如出现下列信息,表示配置成功。

其中会显示Java 配置环境以及Maven配置环境


二.修改Maven仓库路径

本人希望放在D盘,个人根据自身情况而定

1.在D盘新建文件,如下:


2.配置D:\m2中setting.xml文件,内容如下:

<span style="font-family:KaiTi_GB2312;font-size:18px;"><?xml version="1.0" encoding="UTF-8"?>
<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">
	
	<pluginGroups />
	<proxies />
	<servers />
	<mirrors />
	<localRepository>D:/m2/repository</localRepository>
</settings></span>
3.配置D:\Software_IDE\apache-maven-3.0.4\conf中setting.xml文件,找到LocalRepository,修改所需要的路径

<span style="font-family:KaiTi_GB2312;font-size:18px;"><localRepository>D:\m2\repository</localRepository></span>
三.eclipse中配置Maven

1.打开Eclipse,找到Window->Preferences->Maven,如图


2.配置setting


好了,大功告成,可以试试。




GitHub 加速计划 / ma / maven
27
0
下载
Maven: Apache Maven是一个开源的项目管理和构建工具,主要用于Java项目。适合需要自动化项目构建和依赖管理的开发者。特点包括约定优于配置、易于使用和社区驱动。
最近提交(Master分支:5 个月前 )
69980eea Bumps [net.bytebuddy:byte-buddy](https://github.com/raphw/byte-buddy) from 1.17.0 to 1.17.1. - [Release notes](https://github.com/raphw/byte-buddy/releases) - [Changelog](https://github.com/raphw/byte-buddy/blob/master/release-notes.md) - [Commits](https://github.com/raphw/byte-buddy/compare/byte-buddy-1.17.0...byte-buddy-1.17.1) --- updated-dependencies: - dependency-name: net.bytebuddy:byte-buddy dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- https://issues.apache.org/jira/browse/MNG-8585 10 天前
0d6ed20c 11 天前
Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐