
idea打包推送maven仓库及同时推送到不同的maven仓库,本地和云上的腾讯云
idea客户端打包推送jar报错如下: Execution failed for task ':scooterProject-api:publishMavenPublicationToMavenRepository'. > Failed to publish publication 'maven' to repository 'maven' > Could not GET 'http://10.0.3.208:8081/nexus/content/repositories/snapshots/com/testProj/scooterProject-api/1.0.3-SNAPSHOT/maven-metadata.xml'. > Connect to 10.0.3.208:8081 [/10.0.3.208] failed: Connection refused: connect 在命令行执行:telnet 10.0.3.208 8081 或 curl -v http://10.0.3.208:8081 测试连接
dependencies { classpath 'com.testProj.tool:dependency-management:3.0-SNAPSHOT' } 这是jar文件吗? 这个要在哪里找
在公司git代码仓库看中根据名称搜索项目,修改方案:重新打包3.1版本,修改的是这个插件项目,将git地址修改。 (aa.bb.cc.dd是git地址,xx.xx.xx.xx是腾讯云maven地址) >> git@aa.bb.cc.dd:auto/dependency-management-plugin.git
更新该项目中的 10.0.3.208地址 >> xx.xx.xx.xx (腾讯云代码仓库地址),重新升级jar包解决。 (dependency-management:3.1-SNAPSHOT)这样本地的idea项目可以直接通过客户端提交jar包文件。
内网地址(10.0.3.208地址)的git仓库地址,改成了腾讯云(xx.xx.xx.xx)的git仓库地址。本地的映射不起作用。
1.在推送的节点: publishing
repositories {
maven {
credentials {
username 'admin'
password 'pwd'
}
url "http://xx.xx.xx.xx:8081/nexus/content/repositories/snapshots/"
}
}2.私服 腾讯云nexus访问地址:http://xx.xx.xx.xx:8081/nexus,同时推送 10.0.3.208:8081/nexus不变
publishing {
publications {
maven(MavenPublication) {
groupId = 'com.testProj'
artifactId = 'scooterProject-api'
version = '20250610-1.0.2-SNAPSHOT'
from components.java
artifact sourceJar
}
}
repositories {
maven {
credentials {
username 'admin'
password 'pwd'
}
url "http://xx.xx.xx.xx:8081/nexus/content/repositories/snapshots/"
}
}
}