Hi,
While publishing maven-metadata file getting error as below, any suggestion please on what went wrong here
Metadata file has repository name as groupId.
2022-12-07 09:38:44,301+0000 WARN [qtp1083752578-11666] cs-writer-sa org.sonatype.nexus.repository.maven.internal.validation.MavenMetadataContentValidator - maven-metadata.xml path gdi_us_processes/maven-metadata.xml does not match the expected path csua-maven-release/gdi_us_processes/maven-metadata.xml
2022-12-07 09:38:44,301+0000 WARN [qtp1083752578-11666] cs-writer-sa org.sonatype.nexus.repository.maven.internal.orient.MavenFacetImpl - org.sonatype.nexus.repository.InvalidContentException: Invalid maven-metadata.xml GAV csua-maven-release, gdi_us_processes, null does not match request path gdi_us_processes/maven-metadata.xml
2022-12-07 09:38:44,343+0000 WARN [qtp1083752578-11666] cs-writer-sa org.sonatype.nexus.repository.view.handlers.ExceptionHandler - Invalid content: PUT /gdi_us_processes/maven-metadata.xml: org.sonatype.nexus.repository.InvalidContentException: Invalid maven-metadata.xml GAV csua-maven-release, gdi_us_processes, null does not match request path gdi_us_processes/maven-metadata.xml
Version 3.30.0 is really old. There’s a high chance this was a bug we have fixed in one of past release. Please try again using the most recent version of Nexus Repository and let us know if the problem persists.
Thanks for the response, I tried to upload on a different nexus server running on below version. Saw same error. Can we have Repository name as groupId in the metadata.xml file as we are seeing invalid content exception?
The current latest release is 3.43.0. The XML you posted does not look like an XML file at all, but I suspect it’s due to wrong formatting of your post. I think your XML file is incorrect, because you’re trying to post maven-metadata.xml for csua-maven-release:gdi_us_processes:null on a path of gdi_us_processes groupId. What Maven version and command are you using when you get this error log?
Hi Dawid,
xml file looks like below, using curl command to upload this file to a repository named csua-maven-release. This repo name and groupId are same here
Oh, I see. In this case there is no bug in Nexus Repository here. You’re uploading it wrong and Nexus Repository is telling you exactly what’s wrong in the error log you originally posted. Either use Maven client that will do it correctly or adjust your path or your XML.