【Exception】[ERROR] Plugin org.apache.maven.plugins:maven-enforcer-plugin:1.4 or one of its dependenc

Talk is cheap, show me the code.

环境 | Environment

k version
OS windows 11
jdk 1.8
maven 3.6.0
junit junit4 mian

复现步骤 | Reproduction steps

  1. git clone [email protected]:tanpenggood-fork/junit4.git
  2. cd junit4
  3. mvn verify

报错日志 | Error log

[ERROR] Plugin org.apache.maven.plugins:maven-enforcer-plugin:1.4 or one of its dependencies

原因分析 | Analysis

阿里的镜像更新了,所以用https了而不是http

解决方案 | Solution

  1. settings.xml url 使用https

    
    
    
    	
    	
    
    	
    	
    
    	
    	
    
    	
    		
    		
    			aliyun
    			aliyun Maven
    			*
    			https://maven.aliyun.com/nexus/content/groups/public/
    		
    	
    
    	
    	
    	
    		
    	
    
    
  2. VIM Options 开启 ssl证书验证

    -Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true -Dmaven.wagon.http.ssl.ignore.validity.dates=true
    

    【Exception】[ERROR] Plugin org.apache.maven.plugins:maven-enforcer-plugin:1.4 or one of its dependenc_第1张图片

参考 | References

CSDN - 解决IDEA的Plugin org.apache.maven.pluginsmaven-archetype-pluginRELEASE or one of its dependencies

你可能感兴趣的:(Exception,java,maven,junit4)