1

I use spring-contract as contract test in my project with gradle. I want to publish the contract stubs to nexus server. But when I execute the publishing command. The error occur.

build.gradle file

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
            }
        }
    }
}
......

when I execute the publish command below

./gradlew publish -P nexusUsername=xxx -P nexusPassword=xxx -P nexusUrl=nexus-domain:8081/repository/maven-snapshots/

then occur the error

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

But there has a xx:backend:0.0.1-SNAPSHOT/maven-metadata.xml in remote xxx:8081/repository/maven-snapshots/ in the nexus server.(it was working before, but it's not working now.) So I am confused now... Do yo have some suggestion? Please.

]([![

Xin
  • 55
  • 1
  • 6

0 Answers0