You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by mi...@apache.org on 2020/08/13 21:27:54 UTC
[maven-resolver] branch MRESOLVER-131 updated: Start documentation
This is an automated email from the ASF dual-hosted git repository.
michaelo pushed a commit to branch MRESOLVER-131
in repository https://gitbox.apache.org/repos/asf/maven-resolver.git
The following commit(s) were added to refs/heads/MRESOLVER-131 by this push:
new 0acb8fb Start documentation
0acb8fb is described below
commit 0acb8fb403421b7757db404215d73694d0e6ebff
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Thu Aug 13 23:27:42 2020 +0200
Start documentation
---
maven-resolver-synccontext-redisson/pom.xml | 2 +-
.../src/site/markdown/index.md | 105 +++++++++++++++++++++
.../src/site/site.xml | 2 +-
3 files changed, 107 insertions(+), 2 deletions(-)
diff --git a/maven-resolver-synccontext-redisson/pom.xml b/maven-resolver-synccontext-redisson/pom.xml
index 618d667..99825d8 100644
--- a/maven-resolver-synccontext-redisson/pom.xml
+++ b/maven-resolver-synccontext-redisson/pom.xml
@@ -32,7 +32,7 @@
<name>Maven Artifact Resolver Sync Context Redisson</name>
<description>
- A sync context implementation using Redisson distributed locks.
+ A synchronization context implementation using Redisson distributed locks.
</description>
<properties>
diff --git a/maven-resolver-synccontext-redisson/src/site/markdown/index.md b/maven-resolver-synccontext-redisson/src/site/markdown/index.md
new file mode 100644
index 0000000..acc097a
--- /dev/null
+++ b/maven-resolver-synccontext-redisson/src/site/markdown/index.md
@@ -0,0 +1,105 @@
+# Redisson Sync Context for Maven Resolver
+
+<!--
+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.
+-->
+
+<span style="color: red; font-size: 16pt">***Note***: *This component is still considered to be experimental use with caution!*</span>
+
+The Redisson Sync Context is a Redisson-based distributed locks factory for Maven Resolver on top
+of Redis to provide a fast, concurrent-safe access from one or multiple Maven instances to the
+same local Maven repository.
+
+For further details of the factory read the [Javadoc](./apidocs/org/eclipse/aether/synccontext/RedissonSyncContextFactory.html).
+
+## Open Issues/Notes
+
+- It only works when dependency injection is used and not the bundled `AetherModule` or
+ `ServiceLocator` (Maven uses dependency injection)
+- It includes a lot of trace logging which partially will go way as soon as it has been stablilized
+- Usage from plugins has not been tested yet
+- The `furnace-maven-plugin` does not work this implementation because it uses `ServiceLocator` instead
+ of dependency injection
+- The installation process has not been streamlined yet
+
+## Installation/Testing
+
+- Clone Maven Resolver, switch to `MRESOLVER-131` branch and perform `mvn install`
+- Clone Maven, switch to `master` branch, change the Resolver version in Maven's parent POM: `1.5.1-SNAPSHOT`
+- Extract `apache-maven-3.7.0-SNAPSHOT-bin.tar.gz` to a location of your choice
+- Modify `${maven.home}/bin/m2.conf` and add `optionally ${maven.home}/lib/ext/redisson/*.jar`
+ right after the `${maven.home}/conf/logging` line
+- Add/modify the following entries in `${maven.home}/conf/logging/simplelogger.properties`:
+ ```
+ org.slf4j.simpleLogger.showDateTime=true
+ org.slf4j.simpleLogger.showThreadName=true
+ org.slf4j.simpleLogger.showShortLogName=true
+ org.slf4j.simpleLogger.log.org.eclipse.aether=trace
+ #org.slf4j.simpleLogger.log.org.redisson=debug
+ #org.slf4j.simpleLogger.log.io.netty=debug
+ ```
+- Go back to Resolver and run `mvn dependency:copy-dependencies -pl maven-resolver-synccontext-redisson`
+- Copy the following dependencies from `maven-resolver-synccontext-redisson/target/dependency`
+ to `${maven.home}/lib/ext/redisson/`:
+ ```
+ ├── byte-buddy-1.10.7.jar
+ ├── cache-api-1.0.0.jar
+ ├── jackson-annotations-2.11.1.jar
+ ├── jackson-core-2.11.1.jar
+ ├── jackson-databind-2.11.1.jar
+ ├── jackson-dataformat-yaml-2.11.1.jar
+ ├── javax.annotation-api-1.3.2.jar
+ ├── jboss-marshalling-2.0.9.Final.jar
+ ├── jboss-marshalling-river-2.0.9.Final.jar
+ ├── jodd-bean-5.0.13.jar
+ ├── jodd-core-5.0.13.jar
+ ├── maven-resolver-synccontext-redisson-1.5.1-SNAPSHOT.jar
+ ├── netty-buffer-4.1.51.Final.jar
+ ├── netty-codec-4.1.51.Final.jar
+ ├── netty-codec-dns-4.1.51.Final.jar
+ ├── netty-common-4.1.51.Final.jar
+ ├── netty-handler-4.1.51.Final.jar
+ ├── netty-resolver-4.1.51.Final.jar
+ ├── netty-resolver-dns-4.1.51.Final.jar
+ ├── netty-transport-4.1.51.Final.jar
+ ├── reactive-streams-1.0.3.jar
+ ├── reactor-core-3.3.4.RELEASE.jar
+ ├── redisson-3.13.3.jar
+ ├── rxjava-2.2.19.jar
+ └── snakeyaml-1.26.jar
+ ```
+ Dependencies which are already bundled with Maven have been omitted.
+- Start your Redis instance on a machine of your choice (ideally `localhost`)
+- Now start a multithreaded Maven (`3.7.0-SNAPSHOT`) build on your project and you should see at least these lines:
+ ```
+ # This line does not appear for the default configuration
+ 2316 [main] [TRACE] RedissonSyncContextFactory - Reading Redisson config file from '${maven.home}/conf/maven-resolver-redisson.yaml'
+ 4626 [main] [TRACE] RedissonSyncContextFactory - Created Redisson client with id '1c8db59b-7939-4014-8506-ae841c74608c'
+ 35318 [main] [TRACE] RedissonSyncContextFactory - Shutting down Redisson client with id '1c8db59b-7939-4014-8506-ae841c74608c'
+ ```
+
+## Configuration Options
+
+Option | Type | Description | Default Value
+--- | --- | --- | --- | ---
+`aether.syncContext.redisson.configFile` | String | Path to a Redisson configuration file in YAML format. Read [official documentation](https://github.com/redisson/redisson/wiki/2.-Configuration) for details. | `${maven.home}/conf/maven-resolver-redisson.yaml`
+`aether.syncContext.redisson.discriminator` | String | A discriminator uniquely identifying a host and repo combination. If the generation of the default value fails, it will use `sha1('default:${maven.repo.local}')` or as last resort `sha1('default')`. | `sha1('${hostname}:${maven.repo.local}')`
+
+## Set Configuration from Apache Maven
+
+To set one of the configuration options from above just use system variables.
\ No newline at end of file
diff --git a/maven-resolver-synccontext-redisson/src/site/site.xml b/maven-resolver-synccontext-redisson/src/site/site.xml
index 96707f8..0dd2b23 100644
--- a/maven-resolver-synccontext-redisson/src/site/site.xml
+++ b/maven-resolver-synccontext-redisson/src/site/site.xml
@@ -22,7 +22,7 @@ under the License.
<project xmlns="http://maven.apache.org/DECORATION/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/DECORATION/1.0.0 http://maven.apache.org/xsd/decoration-1.0.0.xsd"
- name="RedissonSyncContextFactory">
+ name="RedissonSyncContext">
<body>
<menu name="Overview">
<item name="Introduction" href="index.html"/>