idea配置maven记录
- 首先找到maven下conf下的settings.xml文件,进行配置修改,如我本地路径D:\maven\apache-maven-3.5.4\conf\settings.xml
-
修改settings.xml文件主要三个地方
- 本地仓库地址修改,
修改为本地的repository包下
<localRepository>D:\maven\apache-maven-3.5.4\repository</localRepository>
- 镜像仓库
修改为阿里云
<!--阿里云镜像--> <mirror> <id>alimaven</id> <name>aliyun maven</name> <url>http://maven.aliyun.com/nexus/content/groups/public/</url> <mirrorOf>central</mirrorOf> </mirror> <!--中央仓库在中国的位置--> <mirror> <id> maven-net-cn </id> <name>Maven China Mirror</name> <url>http://maven.net.cn/content/groups/public/</url> <mirrorOf>central</mirrorOf> </mirror>
- jdk版
设置为1.8
<profile> <id>jdk-1.8</id> <activation> <activeByDefault>true</activeByDefault> <jdk>1.8</jdk> </activation> <properties> <maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.target>1.8</maven.compiler.target> <maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion> </properties> </profile>
- 本地仓库地址修改,
-
配置idea的maven配置(前提:已装好jdk并配置)
-
最后配置一下环境变量,同java配置一样path配置到bin