-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Missing groupId in maven packages (<parent> section in pom.xml files not consulted for groupId or version) #30568
Comments
This also affects the sample mvn dependency:get command in the UI
|
<dependency>
<groupId>org.apache.shardingsphere</groupId>
<artifactId>shardingsphere-jdbc</artifactId>
<version>5.5.1-SNAPSHOT</version>
</dependency>
|
@yuchen16 - There are two problems with the display. The first is when the groupID is inherited from the parent as mentioned in the ticket description. The second is on the dependencies when " @linghengqian I am not sure I understood your last point... two artifacts with the same artifactId and different group-names is absolutely OK in a maven repository. It is the combination of groupId + artifactId that must be unique. Both of these should be valid.
Where gitea made a bad descision about the separator '-' is the following:
These would both result in the same URL: Although a '-' in a groupID is bad practice, it is not forbidden and perfectly valid.
Why Gitea decided to use a '-' instead of a subpath '/' here I will probably never understand :/ |
|
Absolutely - this was IMHO simply a bad design decision. |
Two problems here:
-> Fix maven pom inheritance #32943
Yes, I also agree it's not a good design ..... but if we'd like to change it, it might be a "breaking" change. Do you think it is a must to change it at the moment? If not, let's keep it for a while and propose some better (breaking) designs in the future. (I added a FIXME in #32943 ) |
Description
As defined in https://maven.apache.org/guides/introduction/introduction-to-the-pom.html#Example_1
In gitea this triggers a problem. Simple example:
Since the groupId is only specified in the
<parent>
section, it's not found and the package gets an empty groupId in its metadata.See DB:
The UI shows:
Gitea Version
1.21.10
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
The official docker container
How are you running Gitea?
The official docker container
Database
PostgreSQL
The text was updated successfully, but these errors were encountered: