cstamas commented on code in PR #1610:
URL: https://github.com/apache/maven-resolver/pull/1610#discussion_r2401344061


##########
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:
   One of the typical pain was long time index: indexes are also _published 
within repository_, [here](https://repo.maven.apache.org/maven2/.index/). And 
originally, Maven Indexer had to reimplement everything (full transport stack) 
to get it from same place, from where user was already getting artifacts from 
(with same possible proxies, mirrors, auth and all the cruft). Now, Resolver 
would be able even to get indexes for you, no need to reimplement anything, as 
any file, that is published via repository is reachable to Resolver and Maven 
(and plugins).



-- 
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]

Reply via email to