前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >解决:Connect to xx.xx.xxx.xx :8081 [/xx.xx.xx.xx] failed: Connection refu sed: connect -> [H

解决:Connect to xx.xx.xxx.xx :8081 [/xx.xx.xx.xx] failed: Connection refu sed: connect -> [H

作者头像
微风-- 轻许--
发布2022-04-13 16:12:22
5800
发布2022-04-13 16:12:22
举报
文章被收录于专栏:java 微风

1. 自行启动了个 Nenux 服务。想把本地工程推送到 个人私服,执行命令:mvn deploy 报错:

代码语言:javascript
复制
Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy 
(default-deploy) on project gentle: 
Failed to retrieve remote metadata com:gentle:1.0-SNAPSHOT/maven-metadata.xml:
 Could not transfer metadata com:gentle:1.0-SNAPSHOT/maven-metadata.xml
 from/to user-snapshots (http://xx.xx.xx.xx:8081/nexus/content/repositories/snapshots/):
 Connect to xx.xx.xx.xx:8081 [/xx.xx.xx.xx] failed: Connection refused: connect -> [H

2. 原因: 我的 私服 服务挂了。

重启了一下就 OK 了。

3. 另外注意 :maven 配置文件 setting.xml 中私服 id 要和项目 pom.xml 中配置的 id 一致:

代码语言:javascript
复制
1.这是在pom.xml 中:

  <distributionManagement>
        <!--JY - 私服-->
        <repository>
            <id>releases</id>
            <name>Nexus Release Repository</name>
            <url>http://此处是服务器IP:8081/repository/maven-releases/</url>
        </repository>
        <snapshotRepository>
            <id>snapshots</id>
            <name>Nexus Snapshot Repository</name>
            <url>http://此处是服务器IP:8081/repository/maven-snapshots/</url>
        </snapshotRepository>
    </distributionManagement>



2.这是在 setting.xml 中:

	<servers>			
		<!-- JY 私服配置 -->
		 <server>
		  <id>releases</id>
		  <username>admin</username>
		  <password>admin123</password>
		</server>
		<server>
		  <id>snapshots</id>
		  <username>admin</username>
		  <password>admin123</password>
		</server>
	</servers>
本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2018/11/28 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档