【Maven】下载配置maven以及IDEA配置maven详情

目录

1、下载maven

2、配置settings.xml

        2.1、配置本地仓库

        2.2、配置阿里云镜像仓库

        2.3、配置JDK

3、配置环境变量

4、IDEA配置maven

1、下载maven

maven官网:https://maven.apache.org/

2、配置settings.xml

        2.1、配置本地仓库

  <localRepository>C:\Java\Maven\apache-maven-3.9.6\repository</localRepository> 

        2.2、配置阿里云镜像仓库

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

        2.3、配置JDK

    <profile>
        <id>jdk-17</id>
        <activation>
          <activeByDefault>true</activeByDefault>
          <jdk>17</jdk>
        </activation>
        <properties>
          <maven.compiler.source>17</maven.compiler.source>
          <maven.compiler.target>17</maven.compiler.target>
          <maven.compiler.compilerVersion>17</maven.compiler.compilerVersion>
        </properties>
    </profile> 

3、配置环境变量

4、IDEA配置maven

猜你喜欢

转载自blog.csdn.net/weixin_45481821/article/details/135327776