其他分享
首页 > 其他分享> > Maven初体验_Joker

Maven初体验_Joker

作者:互联网

配置环境变量

maven3.6.1下载地址:https://archive.apache.org/dist/maven/maven-3/3.6.1/binaries/

 

在Path中添加:%MAVEN_HOME%\bin

 

修改E:\software\Maven\apache-maven-3.6.1\conf\settings.xml配置

1.配置Maven本地仓库

<localRepository>E:\software\Maven-Repo</localRepository>

2.配置中央仓库镜像(在<mirrors></mirrors>标签中添加<mirror>标签)

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

3.配置默认使用的JDK版本(在<profiles></profiles>标签中添加<profile>标签)

<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>    
</profiles>

IDEA中的配置(本人IDEA版本:2019.3.5)

1.右键File-Settings

2.选择Build,Execution,Deployment-Build Tools-Maven

 

标签:Joker,初体验,标签,配置,1.8,Maven,添加,maven
来源: https://www.cnblogs.com/rng-joker/p/16025876.html