[ 
https://issues.apache.org/jira/browse/MRESOLVER-273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17610010#comment-17610010
 ] 

ASF GitHub Bot commented on MRESOLVER-273:
------------------------------------------

michael-o commented on code in PR #194:
URL: https://github.com/apache/maven-resolver/pull/194#discussion_r981142997


##########
maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/synccontext/named/providers/DiscriminatingNameMapperProvider.java:
##########
@@ -0,0 +1,53 @@
+package org.eclipse.aether.internal.impl.synccontext.named.providers;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import javax.inject.Named;
+import javax.inject.Provider;
+import javax.inject.Singleton;
+
+import 
org.eclipse.aether.internal.impl.synccontext.named.DiscriminatingNameMapper;
+import org.eclipse.aether.internal.impl.synccontext.named.GAVNameMapper;
+import org.eclipse.aether.internal.impl.synccontext.named.NameMapper;
+
+/**
+ * The "discriminating" name mapper provider.
+ *
+ * @since TBD
+ */
+@Singleton
+@Named( DiscriminatingNameMapperProvider.NAME )
+public class DiscriminatingNameMapperProvider implements Provider<NameMapper>
+{
+    public static final String NAME = "discriminating";

Review Comment:
   I think one should be sooner or later renamed to `discriminating-gav` since 
with also have `file-gav` and not just `file`. Same applies for the classname 
of this provider.





> Create more compact File locking layout/mapper
> ----------------------------------------------
>
>                 Key: MRESOLVER-273
>                 URL: https://issues.apache.org/jira/browse/MRESOLVER-273
>             Project: Maven Resolver
>          Issue Type: Improvement
>          Components: Resolver
>            Reporter: Tamás Cservenák
>            Assignee: Tamás Cservenák
>            Priority: Major
>             Fix For: resolver-next
>
>
> Current FileGAVNameMapper "mimics" loosely local reposiory layout, uses long 
> paths, hence (relatively) big strings etc. 
> More compact layout would be just to hash strings like "a:G:A:V" and 
> "m:G[:A[:V]]" for artifacts and metadata instead, and create 2 level deep 
> hashed storage.
> Problem with "loose" layout is that they do end up as files in OS, while 
> these would be much shorter.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to