You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by cs...@apache.org on 2022/06/24 10:55:42 UTC
[maven] branch resolver-locking-mode updated: Add more user friendly(er) locking modes.
This is an automated email from the ASF dual-hosted git repository.
cstamas pushed a commit to branch resolver-locking-mode
in repository https://gitbox.apache.org/repos/asf/maven.git
The following commit(s) were added to refs/heads/resolver-locking-mode by this push:
new ab4491445 Add more user friendly(er) locking modes.
ab4491445 is described below
commit ab44914452e21e22d70f05934439a04f1ba2c5ff
Author: Tamas Cservenak <ta...@cservenak.net>
AuthorDate: Fri Jun 24 12:55:18 2022 +0200
Add more user friendly(er) locking modes.
---
.../aether/DefaultRepositorySystemSessionFactory.java | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/maven-core/src/main/java/org/apache/maven/internal/aether/DefaultRepositorySystemSessionFactory.java b/maven-core/src/main/java/org/apache/maven/internal/aether/DefaultRepositorySystemSessionFactory.java
index 8b73a7a85..f57ff4b9b 100644
--- a/maven-core/src/main/java/org/apache/maven/internal/aether/DefaultRepositorySystemSessionFactory.java
+++ b/maven-core/src/main/java/org/apache/maven/internal/aether/DefaultRepositorySystemSessionFactory.java
@@ -89,6 +89,10 @@ public class DefaultRepositorySystemSessionFactory
private static final String MAVEN_RESOLVER_LOCKING_FILE = "file";
+ private static final String MAVEN_RESOLVER_LOCKING_HAZELCAST = "hazelcast";
+
+ private static final String MAVEN_RESOLVER_LOCKING_REDISSON = "redisson";
+
private static final String MAVEN_RESOLVER_LOCKING_AUTO = "auto";
private static final String MAVEN_RESOLVER_LOCKING_LOCK_FACTORY_KEY = "aether.syncContext.named.factory";
@@ -308,6 +312,16 @@ public class DefaultRepositorySystemSessionFactory
configProps.put( MAVEN_RESOLVER_LOCKING_LOCK_FACTORY_KEY, "rwlock-local" );
configProps.put( MAVEN_RESOLVER_LOCKING_NAME_MAPPER_KEY, "gav" );
}
+ else if ( MAVEN_RESOLVER_LOCKING_HAZELCAST.equals( locking ) )
+ {
+ configProps.put( MAVEN_RESOLVER_LOCKING_LOCK_FACTORY_KEY, "semaphore-hazelcast-client" );
+ configProps.put( MAVEN_RESOLVER_LOCKING_NAME_MAPPER_KEY, "discriminating" );
+ }
+ else if ( MAVEN_RESOLVER_LOCKING_REDISSON.equals( locking ) )
+ {
+ configProps.put( MAVEN_RESOLVER_LOCKING_LOCK_FACTORY_KEY, "rwlock-redisson" );
+ configProps.put( MAVEN_RESOLVER_LOCKING_NAME_MAPPER_KEY, "discriminating" );
+ }
else if ( !MAVEN_RESOLVER_LOCKING_AUTO.equals( locking ) )
{
throw new IllegalArgumentException( "Unknown resolver locking mode '" + transport