gnodet commented on code in PR #1610:
URL: https://github.com/apache/maven-resolver/pull/1610#discussion_r2401261240
##########
maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/synccontext/named/GAVNameMapper.java:
##########
@@ -103,18 +104,46 @@ private static String getArtifactName(Artifact artifact,
String prefix, String s
+ suffix;
}
+ private static final String MAVEN_METADATA = "maven-metadata.xml";
+
private static String getMetadataName(Metadata metadata, String prefix,
String separator, String suffix) {
- String name = prefix;
- if (!metadata.getGroupId().isEmpty()) {
- name += metadata.getGroupId();
- if (!metadata.getArtifactId().isEmpty()) {
- name += separator + metadata.getArtifactId();
- if (!metadata.getVersion().isEmpty()) {
- name += separator + metadata.getVersion();
+ if (metadata.getType().contains("/")) {
+ String metadataType = metadata.getType();
+ int slash = metadataType.indexOf('/');
+ return metadataType.substring(0, slash)
Review Comment:
Why do we put the first part of the metadata in front while we usually used
`g/a/v/t` ?
What are the types containing a `/` ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]