Win10 配置JDK、maven、gradle环境变量

1、配置JDK:JAVA_HOME、D:\Java\jdk1.8.0_301、

编辑PATH 系统变量,新建: %JAVA_HOME%\bin、%JAVA_HOME%\jre\bin

2、配置maven:MAVEN_HOME、D:\Java\apache-maven-3.5.2、创建maven库目录:maven_repository

编辑PATH 系统变量,新建:%MAVEN_HOME%\bin

 

修改文件settings.xml

本地仓库路径

  <localRepository>D:\Java\maven_repository</localRepository>

配置阿里云镜像仓库配置

    <mirror>
      <id>nexus-aliyun</id>
      <name>Nexus aliyun</name>
      <url>https://maven.aliyun.com/nexus/content/groups/public/</url>
      <mirrorOf>central</mirrorOf>
    </mirror>

配置全局jdk

<profile>  
    <id>jdk18</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>

3、配置gradle:GRADLE_HOME、D:\Java\gradle-5.6.2

编辑PATH 系统变量,新建:%GRADLE_HOME%\bin

4、配置gradle,指向本地仓库地址:GRADLE_USER_HOME、D:\Java\gradle_repository

猜你喜欢

转载自blog.csdn.net/piaomiao_/article/details/127388380