首頁 > Web開發 > 詳細

git 打包報錯:Maven Build時提示:Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test

時間:2018-07-03 13:22:37      閱讀:1761      評論:0      收藏:0      [點我收藏+]

標簽:eve   deploy   cep   嘗試   one   pom   inf   pac   prot   

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

標簽:eve   deploy   cep   嘗試   one   pom   inf   pac   prot   

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

(0)
(0)
   
舉報
評論 一句話評論(0
登錄后才能評論!
? 2014 bubuko.com 版權所有 魯ICP備09046678號-4
打開技術之扣,分享程序人生!
             

魯公網安備 37021202000002號

湖南快乐十分钟走势图