1. 程式人生 > >maven nexus-staging-maven-plugin exception-connect timed out

maven nexus-staging-maven-plugin exception-connect timed out

不知道是國內的網路的問題還是別的原因,在deploy一個maven的artifact到oss server的時候總是報錯:

Failed to execute goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.7:deploy (injected-nexus-deploy) on project becauseQA-utils: Remote staging failed: Failed to deploy artifacts: Could not transfer artifact com.github.becauseQA:becauseQA-utils:jar:sources:1.0.1 from/to nexus (https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/comgithubbecauseqa-1023): connect timed out -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.7:deploy (injected-nexus-deploy) on project becauseQA-utils: Remote staging failed: Failed to deploy artifacts: Could not transfer artifact com.github.becauseQA:becauseQA-utils:jar:sources:1.0.1 from/to nexus (https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/comgithubbecauseqa-1023): connect timed out
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Remote staging failed: Failed to deploy artifacts: Could not transfer artifact com.github.becauseQA:becauseQA-utils:jar:sources:1.0.1 from/to nexus (https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/comgithubbecauseqa-1023): connect timed out
	at org.sonatype.nexus.maven.staging.deploy.DeployMojo.execute(DeployMojo.java:216)
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
	... 20 more
Caused by: org.apache.maven.artifact.deployer.ArtifactDeploymentException: Remote staging failed: Failed to deploy artifacts: Could not transfer artifact com.github.becauseQA:becauseQA-utils:jar:sources:1.0.1 from/to nexus (https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/comgithubbecauseqa-1023): connect timed out
	at org.sonatype.nexus.maven.staging.deploy.strategy.StagingDeployStrategy.finalizeDeploy(StagingDeployStrategy.java:155)
	at org.sonatype.nexus.maven.staging.deploy.DeployMojo.execute(DeployMojo.java:213)
	... 22 more
Caused by: org.apache.maven.artifact.deployer.ArtifactDeploymentException: Failed to deploy artifacts: Could not transfer artifact com.github.becauseQA:becauseQA-utils:jar:sources:1.0.1 from/to nexus (https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/comgithubbecauseqa-1023): connect timed out
	at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:143)
	at org.sonatype.nexus.maven.staging.deploy.strategy.AbstractDeployStrategy.deployUp(AbstractDeployStrategy.java:213)
	at org.sonatype.nexus.maven.staging.deploy.strategy.StagingDeployStrategy.finalizeDeploy(StagingDeployStrategy.java:125)
	... 23 more
Caused by: org.eclipse.aether.deployment.DeploymentException: Failed to deploy artifacts: Could not transfer artifact com.github.becauseQA:becauseQA-utils:jar:sources:1.0.1 from/to nexus (https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/comgithubbecauseqa-1023): connect timed out
	at org.eclipse.aether.internal.impl.DefaultDeployer.deploy(DefaultDeployer.java:317)
	at org.eclipse.aether.internal.impl.DefaultDeployer.deploy(DefaultDeployer.java:245)
	at org.eclipse.aether.internal.impl.DefaultRepositorySystem.deploy(DefaultRepositorySystem.java:413)
	at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:139)
	... 25 more
Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Could not transfer artifact com.github.becauseQA:becauseQA-utils:jar:sources:1.0.1 from/to nexus (https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/comgithubbecauseqa-1023): connect timed out
	at io.takari.aether.connector.AetherRepositoryConnector$2.wrap(AetherRepositoryConnector.java:895)
	at io.takari.aether.connector.AetherRepositoryConnector$2.wrap(AetherRepositoryConnector.java:1)
	at io.takari.aether.connector.AetherRepositoryConnector$PutTask.flush(AetherRepositoryConnector.java:743)
	at io.takari.aether.connector.AetherRepositoryConnector.put(AetherRepositoryConnector.java:345)
	at org.eclipse.aether.internal.impl.DefaultDeployer.deploy(DefaultDeployer.java:311)
	... 28 more
Caused by: java.net.SocketTimeoutException: connect timed out
	at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
	at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:85)
	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
	at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
	at java.net.Socket.connect(Socket.java:589)
	at com.squareup.okhttp.internal.Platform.connectSocket(Platform.java:100)
	at com.squareup.okhttp.Connection.connectSocket(Connection.java:196)
	at com.squareup.okhttp.Connection.connect(Connection.java:172)
	at com.squareup.okhttp.Connection.connectAndSetOwner(Connection.java:367)
	at com.squareup.okhttp.OkHttpClient$1.connectAndSetOwner(OkHttpClient.java:128)
	at com.squareup.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:328)
	at com.squareup.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:245)
	at com.squareup.okhttp.Call.getResponse(Call.java:267)
	at com.squareup.okhttp.Call$ApplicationInterceptorChain.proceed(Call.java:224)
	at com.squareup.okhttp.Call.getResponseWithInterceptorChain(Call.java:195)
	at com.squareup.okhttp.Call.execute(Call.java:79)
	at io.takari.aether.okhttp.OkHttpAetherClient.execute(OkHttpAetherClient.java:167)
	at io.takari.aether.okhttp.OkHttpAetherClient.put(OkHttpAetherClient.java:161)
	at io.takari.aether.connector.AetherRepositoryConnector$PutTask.run(AetherRepositoryConnector.java:715)
	at io.takari.aether.connector.AetherRepositoryConnector.put(AetherRepositoryConnector.java:332)
	... 29 more
[DEBUG] Connection manager is shutting down

反覆嘗試了多次還是報錯,實在沒有辦法了,我只能通過代理上網然後手動進行釋出,操作步驟如下:

  1. 在左邊的導航欄中點選 “Staging Upload”,進入如下頁面:

image

3.  最重要的一步就是這裡了,這裡我們上傳的所有的檔案目錄一定要是你使用maven 外掛nexus-staging-maven-plugin 生成的staging目錄,例如我的工程師becauseQA,那麼目錄就是: becauseQA-utils\target\nexus-staging\staging\104a5d5a8fd342\com\github\becauseQA

3.1 Upload Mode選擇 “Artifact with a Pom”,點選“Select POM to Upload” 進入上面的staging目錄選擇對應的pom檔案;

3.2 點選“Select Artifact(s) for Upload” 按鈕還是進入剛才的staging目錄,選擇對應的jar檔案點選“Add Artifacts”按鈕,重複該步驟上傳該目錄下所有的jar檔案包括doc和source檔案,還有一些用gpg生成的asc檔案,例如這裡對應的所有需要上傳的檔案清單如下:

image

完成所有的設定後,點選“Upload Artifacts”按鈕等待片刻上傳即可成功。

實在是沒有辦法,國內的網路被blocked的太多了,只能嘗試代理上網下手工方式進行釋出了。

另附對應的nexus-staging-maven-plugin外掛的配置資訊

<plugin>
						<groupId>org.sonatype.plugins</groupId>
						<artifactId>nexus-staging-maven-plugin</artifactId>
						<version>${nexus-staging-maven-plugin.version}</version>
						<extensions>true</extensions>

						<configuration>
							<serverId>nexus</serverId>
							<nexusUrl>https://oss.sonatype.org/</nexusUrl>
							<autoReleaseAfterClose>false</autoReleaseAfterClose>
							<sslAllowAll>true</sslAllowAll>
							<stagingProgressPauseDurationSeconds>20</stagingProgressPauseDurationSeconds>
							<stagingProgressTimeoutMinutes>20</stagingProgressTimeoutMinutes>
							<detectBuildFailures>true</detectBuildFailures>
						</configuration>
					</plugin>

相關推薦

maven nexus-staging-maven-plugin exception-connect timed out

不知道是國內的網路的問題還是別的原因,在deploy一個maven的artifact到oss server的時候總是報錯: Failed to execute goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.7:deploy (injected

idea中連線redis中的一個異常:connect timed out

1.錯誤原因 org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException: ### Error committing trans

阿里雲Cont_OS_7連線Reids報錯:java.net.SocketTimeoutException: connect timed out

解決方案1: 將redis.conf中的bind127.0.0.1 用"#"註釋掉; 解決方案2: 關閉防火牆; 關閉命令: systemctl stop firewalld.service 啟動命令: systemctl start firewalld.ser

Jedis連線Redist出現connect timed out

JAVA測試程式碼: public static void main(String[] args) { // 建立Jedis物件,傳遞兩個引數:第一個host為redis伺服器的名稱,第二個為redis伺服器的埠號 Jedis jedis = new

Java連線Redis碰到的坑connect timed out

1,先看Java程式碼 package com.demo; import redis.clients.jedis.Jedis; public class Demo1 { public static void main(String[] args) { Jedis

jedis連線服務超時connect timed out

在eclipse中寫jedis測試時,連線虛擬機器中的redis服務。提示connect timed out 1、可能是虛擬機器網絡卡未開。 開啟虛擬機器網絡卡 2、如果還是連線超時,那就是虛擬機器埠未開啟。參考https://www.cnblogs.com/moxiaoan/p/5683743.h

FastDFS(fdfs)遇到的坑之一,本地fastdfs-client-java開發上傳圖片報錯:java.net.SocketTimeoutException: connect timed out

前置: 我在伺服器上配置了FDFS服務, 伺服器上上傳等測試都通過了,沒問題,後來到本地開發, 用fastdfs-client-java-1.27.jar開發包來連結伺服器,上傳圖片報錯: java.net.SocketTimeoutException: connect

解決spring官方編輯器STS的SocketTimeoutException: connect timed out問題

sts是一個定製版的Eclipse,專為Spring開發定製的,方便建立除錯執行維護Spring應用。 在建立Spring應用的過程同 https://start.spring.io/ 中所示–實際上

通過埠 1433 連線到主機 127.0.0.1 的 TCP/IP 連線失敗。錯誤:“connect timed out解決

環境:SQLServer 2008 R2 + MyEclipse 6.5 + JDK 1.6.24 問題: Java通過JDBC連線SQLServer 2008,出現如下問題:通過埠 1433 連線

通過埠1433連線到主機127.0.0.1的 TCP/IP 連線失敗,錯誤:“connect timed out”的解決方法

解決方案: 1.   開啟SQLServer 配置管理器------->SQLServer for MSQLSERVER------->TCP/IP------->如果沒有啟動,則啟動------->右鍵屬性------->IPAddres

Command aborted because of exception: Command timed-out after 90 seconds

開發十年,就只剩下這套架構體系了! >>>   

Failed to com.spotify:docker-maven-plugin:HttpHostConnectException:Connect to localhost:2375

在用docker部署Spring Cloud的時候,pom.xml: <build> <plugins> <plugin>

Windows下使用Nexus搭建Maven私服(安裝)

支持 blog 試用 prop 解壓 結束 factor repos name 一、下載Nexus 下載OSS最新版:https://www.sonatype.com/download-oss-sonatype 老版本:https://support.sonatype.

Maven出現錯誤No plugin found for prefix 'jetty' in the current

jetty jpress Maven出現錯誤No plugin found for prefix ‘jetty‘ in the current project and in the plugin groups的問題解決只需在maven的setting.xml文件上加入如下節點:<pluginGr

Windows 下Nexus搭建Maven私服

4.3 快照 激活 nap cti sha 基本 新增 項目 轉自:http://blog.csdn.net/fanyuna/article/details/40145827 1、 為什麽使用Nexus 如果沒有私服,我們所需的所有構件都需要通過mave

nexus搭建maven私服及私服jar包上傳和下載

ive 校驗 public 我們 賬號 依賴 detail 接下來 triangle nexus搭建maven私服及私服jar包上傳和下載 標簽: nexus管理maven庫snapshot 2017-06-28 13:02 844人閱讀 評論(0) 收

Nexus搭建Maven私服

gem 說明 原因 x86 copy href .com 3.x jar包 公司一般都有個自己的私服來管理各種jar包,原因大概有這麽3個,分別是:     1、有的公司不能訪問外網,只能通過私服來管理jar包和插件;     2、公司網速比較慢,通過公司的私服來獲取jar

java webservice maven spring Class Not Found Exception解決

exc web date log ring except 解決 cep pos project clean——>maven clean——>update maven ——>server

ubuntu下使用Nexus搭建Maven私服

專業 執行命令 點擊 代理 都是 roo 系統文件 update in 連接 ubuntu下使用Nexus搭建Maven私服 1、私服簡介: 私服是架設在局域網的一種特殊的遠程倉庫,目的是代理遠程倉庫及部署第三方構件。有了私服之後,當 Maven 需要下載構件時,直接請求私

通過Nexus搭建maven私有倉庫,並通過gradle上傳jar

pre install oss 通過 epo 選擇 配置 容器 ffffff 安裝nexus 安裝docker``·bashyum install docker-ce 拉取鏡 docker pull registry.docker-cn.com/sonatype/nex