This is an automated email from the ASF dual-hosted git repository.
michaelo pushed a commit to branch file-lock
in repository https://gitbox.apache.org/repos/asf/maven-resolver.git
The following commit(s) were added to refs/heads/file-lock by this push:
new 5d7839f Takari to FileGAV
5d7839f is described below
commit 5d7839fd454e5a7f55c3c3d4ad2f0eb766c98890
Author: Michael Osipov <[email protected]>
AuthorDate: Sun Dec 12 21:51:00 2021 +0100
Takari to FileGAV
---
.../main/java/org/eclipse/aether/impl/guice/AetherModule.java | 10 +++++-----
.../named/{TakariNameMapper.java => FileGAVNameMapper.java} | 8 ++++----
.../impl/synccontext/named/SimpleNamedLockFactorySelector.java | 2 +-
maven-resolver-impl/src/site/markdown/synccontextfactory.md.vm | 4 ++--
.../aether/internal/impl/synccontext/FileLockAdapterTest.java | 4 ++--
maven-resolver-named-locks/src/site/markdown/index.md.vm | 2 +-
6 files changed, 15 insertions(+), 15 deletions(-)
diff --git
a/maven-resolver-impl/src/main/java/org/eclipse/aether/impl/guice/AetherModule.java
b/maven-resolver-impl/src/main/java/org/eclipse/aether/impl/guice/AetherModule.java
index bb850ed..9edf5f9 100644
---
a/maven-resolver-impl/src/main/java/org/eclipse/aether/impl/guice/AetherModule.java
+++
b/maven-resolver-impl/src/main/java/org/eclipse/aether/impl/guice/AetherModule.java
@@ -49,7 +49,7 @@ import
org.eclipse.aether.internal.impl.synccontext.named.GAVNameMapper;
import
org.eclipse.aether.internal.impl.synccontext.named.DiscriminatingNameMapper;
import org.eclipse.aether.internal.impl.synccontext.named.NameMapper;
import org.eclipse.aether.internal.impl.synccontext.named.StaticNameMapper;
-import org.eclipse.aether.internal.impl.synccontext.named.TakariNameMapper;
+import org.eclipse.aether.internal.impl.synccontext.named.FileGAVNameMapper;
import org.eclipse.aether.named.NamedLockFactory;
import org.eclipse.aether.named.providers.FileLockNamedLockFactory;
import org.eclipse.aether.named.providers.LocalReadWriteLockNamedLockFactory;
@@ -173,8 +173,8 @@ public class AetherModule
.to( GAVNameMapper.class ).in( Singleton.class );
bind( NameMapper.class ).annotatedWith( Names.named(
DiscriminatingNameMapper.NAME ) )
.to( DiscriminatingNameMapper.class ).in( Singleton.class );
- bind( NameMapper.class ).annotatedWith( Names.named(
TakariNameMapper.NAME ) )
- .to( TakariNameMapper.class ).in( Singleton.class );
+ bind( NameMapper.class ).annotatedWith( Names.named(
FileGAVNameMapper.NAME ) )
+ .to( FileGAVNameMapper.class ).in( Singleton.class );
bind( NamedLockFactory.class ).annotatedWith( Names.named(
NoopNamedLockFactory.NAME ) )
.to( NoopNamedLockFactory.class ).in( Singleton.class );
@@ -195,13 +195,13 @@ public class AetherModule
@Named( StaticNameMapper.NAME ) NameMapper staticNameMapper,
@Named( GAVNameMapper.NAME ) NameMapper gavNameMapper,
@Named( DiscriminatingNameMapper.NAME ) NameMapper
discriminatingNameMapper,
- @Named( TakariNameMapper.NAME ) NameMapper takariNameMapper )
+ @Named( FileGAVNameMapper.NAME ) NameMapper fileGavNameMapper )
{
Map<String, NameMapper> nameMappers = new HashMap<>();
nameMappers.put( StaticNameMapper.NAME, staticNameMapper );
nameMappers.put( GAVNameMapper.NAME, gavNameMapper );
nameMappers.put( DiscriminatingNameMapper.NAME,
discriminatingNameMapper );
- nameMappers.put( TakariNameMapper.NAME, takariNameMapper );
+ nameMappers.put( FileGAVNameMapper.NAME, fileGavNameMapper );
return Collections.unmodifiableMap( nameMappers );
}
diff --git
a/maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/synccontext/named/TakariNameMapper.java
b/maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/synccontext/named/FileGAVNameMapper.java
similarity index 96%
rename from
maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/synccontext/named/TakariNameMapper.java
rename to
maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/synccontext/named/FileGAVNameMapper.java
index 984a086..500b330 100644
---
a/maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/synccontext/named/TakariNameMapper.java
+++
b/maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/synccontext/named/FileGAVNameMapper.java
@@ -45,11 +45,11 @@ import java.util.concurrent.ConcurrentMap;
* LockingSyncContext.java</a>
*/
@Singleton
-@Named( TakariNameMapper.NAME )
-public class TakariNameMapper
+@Named( FileGAVNameMapper.NAME )
+public class FileGAVNameMapper
implements NameMapper, FileSystemFriendly
{
- public static final String NAME = "takari";
+ public static final String NAME = "file-gav";
private static final String LOCK_SUFFIX = ".resolverlock";
@@ -57,7 +57,7 @@ public class TakariNameMapper
private final ConcurrentMap<String, Path> baseDirs;
- public TakariNameMapper()
+ public FileGAVNameMapper()
{
this.baseDirs = new ConcurrentHashMap<>();
}
diff --git
a/maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/synccontext/named/SimpleNamedLockFactorySelector.java
b/maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/synccontext/named/SimpleNamedLockFactorySelector.java
index 61b5885..8c96173 100644
---
a/maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/synccontext/named/SimpleNamedLockFactorySelector.java
+++
b/maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/synccontext/named/SimpleNamedLockFactorySelector.java
@@ -92,7 +92,7 @@ public final class SimpleNamedLockFactorySelector
nameMappers.put( StaticNameMapper.NAME, new StaticNameMapper() );
nameMappers.put( GAVNameMapper.NAME, new GAVNameMapper() );
nameMappers.put( DiscriminatingNameMapper.NAME, new
DiscriminatingNameMapper( new GAVNameMapper() ) );
- nameMappers.put( TakariNameMapper.NAME, new TakariNameMapper() );
+ nameMappers.put( FileGAVNameMapper.NAME, new FileGAVNameMapper() );
this.nameMapper = selectNameMapper( nameMappers, getNameMapperName() );
}
diff --git a/maven-resolver-impl/src/site/markdown/synccontextfactory.md.vm
b/maven-resolver-impl/src/site/markdown/synccontextfactory.md.vm
index 77d07a1..9c1f492 100644
--- a/maven-resolver-impl/src/site/markdown/synccontextfactory.md.vm
+++ b/maven-resolver-impl/src/site/markdown/synccontextfactory.md.vm
@@ -55,7 +55,7 @@ For the `aether.syncContext.named.factory` property following
values are allowed
- `rwlock-local` (default), uses JVM `ReentrantReadWriteLock` per lock name,
usable for MT builds.
- `semaphore-local`, uses JVM `Semaphore` per lock name, usable for MT builds.
-- `file-lock`, uses advisory file locking, usable for MP builds (must be used
with `takari` name mapping).
+- `file-lock`, uses advisory file locking, usable for MP builds (must be used
with `file-gav` name mapping).
- `noop`, implement no-op locking (no locking). For experimenting only. Has
same functionality as old "nolock"
SyncContextFactory implementation.
@@ -63,7 +63,7 @@ For the `aether.syncContext.named.nameMapper` property
following values are allo
- `discriminating` (default), uses hostname + local repo + GAV to create
unique lock names for artifacts.
- `gav` uses GAV to create unique lock names for artifacts and metadata. Is
not unique if multiple local repositories are involved.
-- `takari` uses GAV and session to create absolute file paths (to be used with
`file-lock` factory)
+- `file-gav` uses GAV and session to create absolute file paths (to be used
with `file-lock` factory)
- `static` uses static (same) string as lock name for any input. Effectively
providing functionality same as old
"global" locking SyncContextFactory.
diff --git
a/maven-resolver-impl/src/test/java/org/eclipse/aether/internal/impl/synccontext/FileLockAdapterTest.java
b/maven-resolver-impl/src/test/java/org/eclipse/aether/internal/impl/synccontext/FileLockAdapterTest.java
index 1e6ed2d..bebd367 100644
---
a/maven-resolver-impl/src/test/java/org/eclipse/aether/internal/impl/synccontext/FileLockAdapterTest.java
+++
b/maven-resolver-impl/src/test/java/org/eclipse/aether/internal/impl/synccontext/FileLockAdapterTest.java
@@ -19,7 +19,7 @@ package org.eclipse.aether.internal.impl.synccontext;
* under the License.
*/
-import org.eclipse.aether.internal.impl.synccontext.named.TakariNameMapper;
+import org.eclipse.aether.internal.impl.synccontext.named.FileGAVNameMapper;
import org.eclipse.aether.named.providers.FileLockNamedLockFactory;
import org.junit.BeforeClass;
@@ -29,7 +29,7 @@ public class FileLockAdapterTest
@BeforeClass
public static void createNamedLockFactory()
{
- nameMapper = new TakariNameMapper();
+ nameMapper = new FileGAVNameMapper();
namedLockFactory = new FileLockNamedLockFactory();
createAdapter();
}
diff --git a/maven-resolver-named-locks/src/site/markdown/index.md.vm
b/maven-resolver-named-locks/src/site/markdown/index.md.vm
index 6ebf1da..0d8d401 100644
--- a/maven-resolver-named-locks/src/site/markdown/index.md.vm
+++ b/maven-resolver-named-locks/src/site/markdown/index.md.vm
@@ -53,4 +53,4 @@ Out of the box, name mapper implementations are the following:
- `static` implemented in
`org.eclipse.aether.internal.impl.synccontext.named.StaticNameMapper`.
- `gav` implemented in
`org.eclipse.aether.internal.impl.synccontext.named.GAVNameMapper`.
- `discriminating` implemented in
`org.eclipse.aether.internal.impl.synccontext.named.DiscriminatingNameMapper`.
-- `takari` implemented in
`org.eclipse.aether.internal.impl.synccontext.named.TakariNameMapper`.
+- `file-gav` implemented in
`org.eclipse.aether.internal.impl.synccontext.named.FileGAVNameMapper`.