分享web开发知识

注册/登录|最近发布|今日推荐

主页 IT知识网页技术软件开发前端开发代码编程运营维护技术分享教程案例
当前位置:首页 > 代码编程

git 打包报错:Maven Build时提示:Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test

发布时间:2023-09-06 02:02责任编辑:熊小新关键词:apache

1.使用git 升级 服务命令

  mvn  deploy -e

   之后报错:

  

 Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project zm-live-client: Unable to generate classpath: org.apache.maven.artifact.resolver.ArtifactResolutionException: Unable to get dependency information for org.apache.maven.surefire:surefire-junit4:jar:2.12.4: Failed to retrieve POM for org.apache.maven.surefire:surefire-junit4:jar:2.12.4: Could not transfer artifact org.apache.maven.surefire:surefire-junit4:pom:2.12.4 from/to central (https://repo.maven.apache.org/maven2): Received fatal alert: protocol_version[ERROR] org.apache.maven.surefire:surefire-junit4:jar:2.12.4[ERROR][ERROR] from the specified remote repositories:[ERROR] central (https://repo.maven.apache.org/maven2, releases=true, snapshots=false)[ERROR] Path to dependency:[ERROR] 1) dummy:dummy:jar:1.0[ERROR] -> [Help 1]

之后尝试着,mvn install 报同样的错误

原因:从maven私服下载时候无法下载指定的jar包。

 解决办法:

1.maven instal  -Dmaven.test.skip=true

2.pom.xml里面加入以下代码:

<plugin> ?????????<groupId>org.apache.maven.plugins</groupId> ?????????<artifactId>maven-surefire-plugin</artifactId> ?????????<version>2.4.2</version> ?????????<configuration> ???????????<skipTests>true</skipTests> ?????????</configuration> ?</plugin>

参考:https://blog.csdn.net/u011781521/article/details/74868680

git 打包报错:Maven Build时提示:Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test

原文地址:https://www.cnblogs.com/thinkingandworkinghard/p/9257851.html

知识推荐

我的编程学习网——分享web前端后端开发技术知识。 垃圾信息处理邮箱 tousu563@163.com 网站地图
icp备案号 闽ICP备2023006418号-8 不良信息举报平台 互联网安全管理备案 Copyright 2023 www.wodecom.cn All Rights Reserved