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

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

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

时间: 2024-10-13 08:38:59

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

Idea创建Maven项目时出现Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.0.1错误

如果Maven中用的jre用的是idea中自带的,但是环境变量JAVA_HOME配置的是自己的jdk,那么就会出现 解决方法是到settiing中把jre改成自己的jdk中的jre 经过尝试,问题解决

解决maven项目 maven install失败 错误 Failed to execute goal org.apache.maven.plugins

1.Maven构建失败 Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin: 2.3.4 :compile ( default -compile) on project oecp: Compilation failure 2.解决方法:使用自己的jdk,记住是jdk,因为jdk里本身包含jre.而不是单纯的jre.本人初学者,表达肤浅,请看勿笑. 解决maven项目 maven install失败 错误 Fa

2016.6.21 maven使用cmd新建项目时,failed to execute goal org.apache.maven.plugins:maven-archetye-plugin:2.4:generate...

在学习maven的时候,想要新建一个maven工程,在命令行执行create或generate命令. 错误如图所示: failed to execute goal org.apache.maven.plugins:maven-archetye-plugin:2.4:generate... 解决办法: http://doc.okbase.net/Josh_Persistence/archive/192456.html 这里面提到了四种可能的原因及解决办法. 环境变量配置什么的检查就不提了. (1)

Maven创建项目: Failed to execute goal org.apache.maven.plugin( mvn archetype:create)

一.概述: 在使用mvn 命令mvn archetype:create -DgroupId=com.chuanliu.c11 -DartifactId=c11searcher在控制创建maven项目和pom项目时,没有创建成功,错误信息如下: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.4:create (default-cli)  on project standalone-p

Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile)

使用maven打包的时候出现如下错误: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) 解决办法: 1.查看window--Preferences--Installed JREs 中是否引用的是本地的jdk,不是就改为本地jdk 2.若问题依旧存在,则还需要 查看window--Preferences--Installed JREs -- Exe

maven打包报错:Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.5:test

mvn compile  没有问题,mvn package的时候报如下错误: Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.5:test 解决方法: 打包跳过测试有两种方法 一是命令行, mvn clean package -Dmaven.test.skip=true 二是写入pom文件, <plugin> <groupId>org.apache.maven.plugins</g

maven打包报错:Failed to execute goal org.apache.maven

mvn compile  没有问题,mvn package的时候报如下错误: Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.5:test 解决方法: 打包跳过测试有两种方法 一是命令行,mvn clean package -Dmaven.test.skip=true 二是写入pom文件,<plugin>          <groupId>org.apache.maven.plugin

[转]maven打包报错:Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.5:test

源文URL:http://blog.csdn.net/caiwenfeng_for_23/article/details/44514947 mvn compile  没有问题,mvn package的时候报如下错误: Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.5:test 解决方法: 打包跳过测试有两种方法 一是命令行,mvn clean package -Dmaven.test.skip=tr

mvn install 报错Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2 错误: 找不到符号

报错信息 在Eclipse中执行mvn install时,console端显示如下报错信息: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project ERP: Compilation failure: Compilation failure: [ERROR] \test01\src\main\java\HStyl