Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using '-' as separator between GroupID and ArtifactID (Maven) is a poor choice - not unique. #33036

Closed
JWT007 opened this issue Dec 29, 2024 · 2 comments · Fixed by #33049
Closed

Comments

@JWT007
Copy link

JWT007 commented Dec 29, 2024

Description

Copied from discussion in [30568] - originally for a different issue and now closed with pending PR.

Gitea made a poor descision (IMHO) to use the separator '-' between groupID and artifactID.

Consider the following:

<groupId>foo</groupId>
<artifactId>bar-jdbc</artifactId>
<version>1-SNAPSHOT</version>

<groupId>foo-bar</groupId>
<artifactId>jdbc</artifactId>
<version>1-SNAPSHOT</version>

Both result in the same URL:
packages/maven/foo-bar-jdbc/1-SNAPSHOT

Although a '-' in a groupID is not "good-practice", it is not forbidden and perfectly valid and in common use.

For example:

<dependency>
    <groupId>commons-lang.wso2</groupId>
    <artifactId>commons-lang</artifactId>
    <version>2.6.0.wso2v1</version>
</dependency>

Gitea Version

1.22.6

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

Linux

How are you running Gitea?

Database

PostgreSQL

@wxiaoguang
Copy link
Contributor

Will fix it in 1.24 (could try to backport but I can't promise)

@wxiaoguang
Copy link
Contributor

wxiaoguang commented Dec 30, 2024

Now here it is Refactor maven package registry #33049

@lunny lunny added this to the 1.23.0 milestone Dec 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants