Maven-publish plugin: Failed to retrieve remote metadata (maven-metadata.xml)


(tobi) #1

Hello,

I am new to gradle and try to publish my artifacts to nexus. I found the maven-publish plugin for this but I didn’t get it working.

Here is my configuration from build.gradle:

publishing {
        repositories {
           maven {
           url "$baseurl/pws-${project.version.endsWith('-SNAPSHOT') ? 'snapshots' : 'releases' }"
           credentials {
              username '$nexusUser'
              password '$nexusPassword'
          }
       }
 }
}
publishing {
    publications {
        mavenJava(MavenPublication) {
            groupId 'com.my.group.id'
            artifactId 'artifactId'
            version '0.0.1-SNAPSHOT'
        }
    }
}

Whenever I run the task “publish” I get the following error:

Failed to publish publication ‘mavenJava’ to repository ‘maven’
> Failed to retrieve remote metadata com.my.group.id:artifactId:0.1-SNAPSHOT/maven-metadata.xml: Could not transfer metadata com.my.group.id:artifactId:0.1-SNAPSHOT/maven-metadata.xml from/to remote (http://xxxx/xxxxx): Could not get resource ‘com/my/group/id/artifactId/0.1-SNAPSHOT/maven-metadata.xml’

The maven-metadata.xml is not uploaded but I don’t know why.
There is no return value or another error which indicates the problem. Have someone an idea whats going wrong here?

Thanks in advanced
Tobi


Maven Plugin got "Malformed reply from SOCKS server", but mvn deploy:deploy-file not
(Eric) #2

Same issue - no information about what the expectation here is - where does this file come from, what does maven-plugin need to generate it?


(azine.me) #3

@ericcrahensc, @tobiloeb: did you ever find a solution to this problem? Please post it here.