使用maven给springboot项目打包jar报错SSLException错误

才开始显示

[WARNING] 
[WARNING] Some problems were encountered while building the effective settings
[WARNING] Unrecognised tag: 'mirror' (position: START_TAG seen ...<!-- maven\u5b98\u65b9\u955c\u50cf -->\n\t<mirror>... @168:10)  @ E:\soft\maven\apache-maven-3.6.0-bin\apache-maven-3.6.0\conf\settings.xml, line 168, column 10
[WARNING] 
[INFO] Scanning for projects...
[INFO] 
[INFO] --------------------------< com.zcjy:zcjychn >--------------------------
[INFO] Building zcjychn 1.0.0
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-plugins/26/maven-plugins-26.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  22.318 s
[INFO] Finished at: 2019-05-28T08:37:33+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.apache.maven.plugins:maven-clean-plugin:2.6.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.6.1: Could not transfer artifact org.apache.maven.plugins:maven-plugins:pom:26 from/to central (https://repo.maven.apache.org/maven2): Connect to repo.maven.apache.org:443 [repo.maven.apache.org/151.101.24.215] failed: Connection timed out: connect -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
 

尝试:

当前maven版本 maven 3.3.9   jdk7

一直以为是因为包没下载完全导致打包失败

所以就删除了maven》plugins》maven-clean-plugins》2.6.1下面包内的所有文件:

之后maven更新jar,问题依旧。

在多次尝试无果之后:

尝试更新jdk版本,将jdk版本由 jdk7 升级至 jdk8

问题原因是网站的协议是TSL1.2    jdk协议不是1.2版本所以导致一直报错

将jdk升级至8之后问题得以解决

最后继续尝试在cmd中打包  使用命令行 mvn -X clean package -e打印详细信息

最后jar下载到一半之后 继续出现无法现在成功的问题(刚开始卡在downloading maven-clean-plugins.pom)有所进步

最后一次配置11个镜像库,打包才得以成功。

     <mirror>
        <!--This sends everything else to /public -->
        <id>nexus-aliyun</id>
        <mirrorOf>*</mirrorOf>
        <name>Nexus aliyun</name>
        <url>http://maven.aliyun.com/nexus/content/groups/public</url>
    </mirror>

    <mirror>
        <id>osc</id>
        <mirrorOf>*</mirrorOf>
        <url>http://maven.oschina.net/content/groups/public/</url>
    </mirror>

    <mirror>    
      <id>repo2</id>    
      <mirrorOf>central</mirrorOf>    
      <name>Human Readable Name for this Mirror.</name>    
      <url>http://repo2.maven.org/maven2/</url>    
    </mirror>    

    <mirror>    
      <id>net-cn</id>    
      <mirrorOf>central</mirrorOf>    
      <name>Human Readable Name for this Mirror.</name>    
      <url>http://maven.net.cn/content/groups/public/</url>     
    </mirror>    

    <mirror>    
      <id>ui</id>    
      <mirrorOf>central</mirrorOf>    
      <name>Human Readable Name for this Mirror.</name>    
      <url>http://uk.maven.org/maven2/</url>    
    </mirror>    

    <mirror>    
      <id>ibiblio</id>    
      <mirrorOf>central</mirrorOf>    
      <name>Human Readable Name for this Mirror.</name>    
      <url>http://mirrors.ibiblio.org/pub/mirrors/maven2/</url>    
    </mirror>    

    <mirror>    
      <id>jboss-public-repository-group</id>    
      <mirrorOf>central</mirrorOf>    
      <name>JBoss Public Repository Group</name>    
      <url>http://repository.jboss.org/nexus/content/groups/public</url>    
    </mirror>  

    <mirror>    
      <id>JBossJBPM</id>  
      <mirrorOf>central</mirrorOf> 
      <name>JBossJBPM Repository</name>   
      <url>https://repository.jboss.org/nexus/content/repositories/releases/</url>  
    </mirror>  
        <mirror>
        <id>mirrorId</id>
        <mirrorOf>central</mirrorOf>
        <name>Human Readable Name </name>
        <url>http://repo1.maven.org/maven2/</url>
    </mirror>
    <!-- 阿里云镜像2 -->
    <mirror> 
        <id>alimaven</id> 
        <name>aliyun maven</name> 
        <url>http://maven.aliyun.com/nexus/content/repositories/central/</url> 
        <mirrorOf>central</mirrorOf> 
    </mirror>
    <!-- junit镜像地址 -->
    <mirror> 
        <id>junit</id> 
        <name>junit Address/</name> 
        <url>http://jcenter.bintray.com/</url> 
        <mirrorOf>central</mirrorOf> 
    </mirror>

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值