Maven安装

2020-09-25  本文已影响0人  冰花水焰

1. Maven安装与配置

设置本地仓库的位置

<localRepository>D:\maven\apache-maven-3.6.3\repository</localRepository>

设置下载的镜像在<mirrors>标签下(加快下载速度

<mirror>
      <id>alimaven</id>
      <mirrorOf>central</mirrorOf>
      <name>aliyun maven</name>
      <url>http://maven.aliyun.com/nexus/content/groups/public/</url>\
</mirror>

设置jdk编译和运行版本在<profiles>里

<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

image

eclipse使用maven

image
上一篇 下一篇

猜你喜欢

热点阅读