sonatype-nexus-community / nexus-repo-github-action

Nexus Repository for GitHub Actions
Other
39 stars 7 forks source link

org.sonatype.nexus.rest.ValidationErrorsException: Upload to snapshot repositories not supported, use the maven client. #7

Open davidkarlsen opened 2 years ago

davidkarlsen commented 2 years ago

I see this error when attempting to upload a .tar.gz:

2022-01-03 13:28:13,974+0100 INFO  [qtp1572550833-532185]  dts-jenkins-is org.sonatype.nexus.repository.upload.internal.UploadManagerImpl - Uploading component with parameters: repository="snapshots" format="maven2" groupId="com.evry.fs.tac.jfr.jfr-clien
t" artifactId="jfr-client-dist" version="4.0.7-SNAPSHOT" 
2022-01-03 13:28:13,974+0100 INFO  [qtp1572550833-532185]  dts-jenkins-is org.sonatype.nexus.repository.upload.internal.UploadManagerImpl - Asset with parameters: file="jfr-client-dist-4.0.7-SNAPSHOT.tar.gz" extension="tar.gz" 
2022-01-03 13:28:13,975+0100 WARN  [qtp1572550833-532185]  dts-jenkins-is org.sonatype.nexus.siesta.internal.ValidationErrorsExceptionMapper - (ID b02db289-24f8-400f-b120-108b3be01869) Response: [400] '[ValidationErrorXO{id='*', message='Upload to snapsh
ot repositories not supported, use the maven client.'}]'; mapped from: org.sonatype.nexus.rest.ValidationErrorsException: Upload to snapshot repositories not supported, use the maven client.
amoravek commented 2 years ago

The same here.

davidkarlsen commented 2 years ago

@amoravek I ended up simply doing https://maven.apache.org/plugins/maven-deploy-plugin/deploy-file-mojo.html instead.

amoravek commented 2 years ago

thank you, i'll try it. it seems that the problem is nexus-related (and not necessarily action-related) since it does the same when using rest-api.