Document required installation of replication plugin lib

The replication-status plugin relies on events defined in the
replication plugin.

Since Gerrit doesn't provide a way of defining dependencies among
plugins, if replication-status loads before replication, some
classes won't be available at startup.

As a workaround the replication plugin can be added as a lib to
make sure the needed classes are always available at startup.

Bug: Issue 16554
Change-Id: I5a8b0faa6009759249ce6277633db1c75b08bcda
diff --git a/README.md b/README.md
index 97a8736..b61590b 100644
--- a/README.md
+++ b/README.md
@@ -6,6 +6,13 @@
 Consumes replication events and updates a cache with the latest replication
 status of specific refs to specific remotes.
 
+## Dependencies
+
+The @PLUGIN@ depends on the [replication plugin](https://gerrit.googlesource.com/plugins/replication/).
+Check the [configuration section](./src/main/resources/Documentation/config.md) for more details.
+
+## REST API
+
 The cache information is then exposed via a project's resource REST endpoint:
 
 ```bash
diff --git a/src/main/resources/Documentation/config.md b/src/main/resources/Documentation/config.md
index aa01313..8762cb0 100644
--- a/src/main/resources/Documentation/config.md
+++ b/src/main/resources/Documentation/config.md
@@ -1,9 +1,24 @@
 # Config
 
+## Dependencies
+
+Since the @PLUGIN@ plugin relies on some events defined in the `replication`
+plugin, the latter must be installed as a library module in the
+`$GERRIT_SITE/lib` folder.
+
+It can be a simple symlink as follows:
+
+```bash
+cd $GERRIT_SITE/lib
+ln -s $GERRIT_SITE/plugins/replication.jar .
+```
+
+## Settings
+
 The plugin itself has no specific configuration, however some Gerrit specific
 settings are relevant.
 
-## Cache
+### Cache
 
 This plugin relies on a cache to store replication status information, the
 global cache configuration settings apply.
@@ -31,7 +46,7 @@
    maxAge = 1 day
 ```
 
-## Gerrit instanceId
+### Gerrit instanceId
 
 This plugin will try to discriminate among events produced by the current
 instances versus events produced by different instances.