1.去官网下载maven
2.本地新建一个repository文件夹
3.打开maven 里的conf里的setting.xml (用sublime 打开,其他软件会出现奇奇怪怪的东西),打开前先备份
4.修改local repository属性,地址改为本地repository的地址
<localRepository>E:environmentapachemyrepository epository</localRepository>
5.配置阿里云镜像
<mirror> <id>nexus-aliyun</id> <mirrorOf>central</mirrorOf> <name>Nexus aliyun</name> <url>http://maven.aliyun.com/nexus/content/groups/public</url> </mirror>
<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>
6.保存,复制一份setting.xml到repository同级文件夹下
7.配置idea