maven-plugin - 在远程(nexus)中找不到元数据 maven-metadata.xml
问题描述
我在我的项目中使用 spring-contract 作为合同测试。我想将合同存根发布到 nexus 服务器。但是当我执行发布命令时。发生错误。
build.gradle
文件
buildscript {
project.ext {
bootVersion = '2.0.4.RELEASE'
nexusUsername = project.hasProperty('nexusUsername') ? project.getProperty('nexusUsername') : ''
nexusPassword = project.hasProperty('nexusPassword') ? project.getProperty('nexusPassword') : ''
nexusUrl = project.hasProperty('nexusUrl') ? project.getProperty('nexusUrl') : ''
}
}
apply plugin: 'maven-publish'
publishing {
repositories {
maven {
url nexusUrl
credentials {
username = nexusUsername
password = nexusPassword
}
}
}
}
......
当我执行下面的发布命令时
./gradlew publish -P nexusUsername=xxx -P nexusPassword=xxx -P nexusUrl=nexus-domain:8081/repository/maven-snapshots/
然后发生错误
Could not find metadata xxx:backend:0.0.1-SNAPSHOT/maven-metadata.xml in remote (xxx:8081/repository/maven-snapshots/)
Upload xxx:8081/repository/maven-snapshots/xxx/backend/0.0.1-SNAPSHOT/backend-0.0.1-20200409.083111-1.pom
但是在nexus服务器中有一个xx:backend:0.0.1-SNAPSHOT/maven-metadata.xml
远程xxx:8081/repository/maven-snapshots/
。(它以前工作过,但现在不工作了。)所以我现在很困惑......你有什么建议吗?请。
解决方案
推荐阅读
- kubernetes - 从 nexus3 docker 主机拉取 Kubernetes 映像失败
- python-3.x - 替换 python pandas 中的错误日期值
- c# - c#如何在工厂方法中返回一个指定泛型类的类
- flutter - 如何在颤动中设置文本行高?
- python - 通过 pybind11 使用 google/draco 作为 lib 构建
- c# - 为什么新的 C# 8 索引类型从 1 而不是 0 开始?
- python - 字典的键值数未正确输出
- swift - Set的安全编码
- java - JSON 数组长度为 -1 但我可以清楚地看到 JSON 中的对象
- javascript - AnimationMixer 不会播放动画(gltf 文件)