Maven setting配置文件


Maven setting配置镜像仓库

配置本地仓库

   1

  2 E:\JAVA\Maven

国内Maven镜像仓库


    alimaven
    aliyun maven
    http://maven.aliyun.com/nexus/content/groups/public/
    central


    alimaven
    central
    aliyun maven
    http://maven.aliyun.com/nexus/content/repositories/central/



    ibiblio
    central
    Human Readable Name for this Mirror.
    http://mirrors.ibiblio.org/pub/mirrors/maven2/


    jboss-public-repository-group
    central
    JBoss Public Repository Group
    http://repository.jboss.org/nexus/content/groups/public



    central
    Maven Repository Switchboard
    http://repo1.maven.org/maven2/
    central


    repo2
    central
    Human Readable Name for this Mirror.
    http://repo2.maven.org/maven2/


maven项目编译jdk版本更改

首先要下载
maven-compiler-plugin   jar包

通过maven-compiler-plugin  jar包指定JDK版本和编码

方法1

在maven项目的pom.xml中加入一下代码
      
              
                  
                    org.apache.maven.plugins  
                    maven-compiler-plugin  
                    2.1  
                      
                        1.7  
                        1.7  
                      
                  
              
          


然后重新update maven就可以解决该问题

Maven setting配置文件_第1张图片

方法2

修改maven配置文件

      
                jdk-1.8  
                  
                    true  
                    1.8  
                  
                    
                    1.8    
                    1.8    
                    1.8    
                  
          

然后刷新

先右键项目 选择maven选项add plugin

Maven setting配置文件_第2张图片

搜索compiler  选最新的

Maven setting配置文件_第3张图片

然后强制更新项目

完整setting配置


1. 本地仓库路径由 .m2/repository 更改到E:\java\maven

2.增加国内镜像仓库2个

3.maven 编译器版本更改为javaSE-1.8







    
    
    E:\JAVA\Maven
    

    

    
    
        
    

    
    
        
    

    
    
        

        
    

    
    
        

        
            alimaven-central
            central
            aliyun maven
            http://maven.aliyun.com/nexus/content/repositories/central/
        
        
            jboss-public-repository-group
            central
            JBoss Public Repository Group
            http://repository.jboss.org/nexus/content/groups/public
        

        

    

    
    
        
        
            jdk18
            
                1.8
                true
            
            
                1.8
                1.8
                1.8
            
        

        
    

    




你可能感兴趣的:(maven)