Cannot repeatedly publish snapshot packages to Maven package registry. #9349

Closed
opened 2025-11-02 08:36:08 -06:00 by GiteaMirror · 6 comments
Owner

Originally created by @LamGC on GitHub (Aug 4, 2022).

Description

In maven, we can publish the version with the suffix "SNAPSHOT" multiple times, because the "SNAPSHOT" in the version at the time of publishing will be replaced with the timestamp at the time of publishing, which ensures that the snapshot version can be published and updated repeatedly with the same version number.

However, when I tried to publish the snapshot version repeatedly, gradle (using the publishing plug-in) prompted me that gitea returned HTTP 400. I suspected that gitea might not correctly handle the snapshot rules of Maven package registry.

I can't register an account in TryGitea ( I can't receive the activation email ), so I can't test whether this problem will occur in TryGitea.

Gitea Version

1.17.0

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

https://gist.github.com/LamGC/2026d9db31cfaae09350d3669d3002de

Screenshots

image

Git Version

2.30.2

Operating System

Linux Debian 11

How are you running Gitea?

Docker-compose https://docs.gitea.io/zh-cn/install-with-docker-rootless/

Database

MySQL

Originally created by @LamGC on GitHub (Aug 4, 2022). ### Description In maven, we can publish the version with the suffix "SNAPSHOT" multiple times, because the "SNAPSHOT" in the version at the time of publishing will be replaced with the timestamp at the time of publishing, which ensures that the snapshot version can be published and updated repeatedly with the same version number. However, when I tried to publish the snapshot version repeatedly, gradle (using the publishing plug-in) prompted me that gitea returned `HTTP 400`. I suspected that gitea might not correctly handle the snapshot rules of Maven package registry. > I can't register an account in TryGitea ( I can't receive the activation email ), so I can't test whether this problem will occur in TryGitea. ### Gitea Version 1.17.0 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist https://gist.github.com/LamGC/2026d9db31cfaae09350d3669d3002de ### Screenshots ![image](https://user-images.githubusercontent.com/16975255/182912926-a61f26d1-0a2d-450e-98f2-9ee005fbb5bc.png) ### Git Version 2.30.2 ### Operating System Linux Debian 11 ### How are you running Gitea? Docker-compose https://docs.gitea.io/zh-cn/install-with-docker-rootless/ ### Database MySQL
GiteaMirror added the topic/packagestype/bug labels 2025-11-02 08:36:08 -06:00
Author
Owner

@KN4CK3R commented on GitHub (Aug 4, 2022):

Could you provide me more logs please? I need the full first successfull publish and the second failing publish. The request lines are enough (line 1 and 7 in your gist).

Or could you tell me how I can create a package and publish it so I can reproduce the error. I'm not a maven/gradle user so I would need the necessary commands. (as in https://github.com/go-gitea/gitea/pull/16510#issuecomment-976344348)

@KN4CK3R commented on GitHub (Aug 4, 2022): ~Could you provide me more logs please? I need the full first successfull publish and the second failing publish. The request lines are enough (line 1 and 7 in your gist).~ ~Or could you tell me how I can create a package and publish it so I can reproduce the error. I'm not a maven/gradle user so I would need the necessary commands. (as in https://github.com/go-gitea/gitea/pull/16510#issuecomment-976344348)~
Author
Owner

@KN4CK3R commented on GitHub (Aug 4, 2022):

Fixed in #20674

@KN4CK3R commented on GitHub (Aug 4, 2022): Fixed in #20674
Author
Owner

@LamGC commented on GitHub (Aug 5, 2022):

@KN4CK3R The configuration of gradle is troublesome, but I can provide you with a maven sample project. Do you still need it?

@LamGC commented on GitHub (Aug 5, 2022): @KN4CK3R The configuration of gradle is troublesome, but I can provide you with a maven sample project. Do you still need it?
Author
Owner

@LamGC commented on GitHub (Aug 5, 2022):

I used Maven to create a simple publishing example. You need to modify the corresponding content in pom.xml, and then execute ./mvnw deploy to execute the publishing operation.

shapshot-test.zip

@LamGC commented on GitHub (Aug 5, 2022): I used Maven to create a simple publishing example. You need to modify the corresponding content in `pom.xml`, and then execute `./mvnw deploy` to execute the publishing operation. [shapshot-test.zip](https://github.com/go-gitea/gitea/files/9266266/shapshot-test.zip)
Author
Owner

@KN4CK3R commented on GitHub (Aug 5, 2022):

Thank you, but I think I created a working example yesterday. Could you test the linked PR?

@KN4CK3R commented on GitHub (Aug 5, 2022): Thank you, but I think I created a working example yesterday. Could you test the linked PR?
Author
Owner

@LamGC commented on GitHub (Aug 5, 2022):

Thank you, but I think I created a working example yesterday. Could you test the linked PR?

Sorry, it took some time, but I still failed to build the repair version. Can you provide the product? I will test it as soon as possible and give you feedback.

@LamGC commented on GitHub (Aug 5, 2022): > Thank you, but I think I created a working example yesterday. Could you test the linked PR? Sorry, it took some time, but I still failed to build the repair version. Can you provide the product? I will test it as soon as possible and give you feedback.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#9349