Add gradle to all dependency doc sections (#25031)

This commit is contained in:
Christopher Batey 2018-05-07 08:31:09 +01:00 committed by Johan Andrén
parent b62386c495
commit 6674599e50
12 changed files with 75 additions and 298 deletions

View file

@ -165,23 +165,11 @@ Java
To use the Cluster Client you must add the following dependency in your project. To use the Cluster Client you must add the following dependency in your project.
sbt @@dependency[sbt,Maven,Gradle] {
: @@@vars group="com.typesafe.akka"
``` artifact="akka-cluster-tools_$scala.binary_version$"
"com.typesafe.akka" %% "akka-cluster-tools" % "$akka.version$" version="$akka.version$"
``` }
@@@
Maven
: @@@vars
```
<dependency>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-cluster-tools_$scala.binary_version$</artifactId>
<version>$akka.version$</version>
</dependency>
```
@@@
<a id="cluster-client-config"></a> <a id="cluster-client-config"></a>
## Configuration ## Configuration

View file

@ -102,25 +102,12 @@ unique per instance directory. You can control the extract directory with the
@@@ @@@
To enable usage of Sigar you can add the following dependency to the user project To enable usage of Sigar you can add the following dependency to the user project
:
Scala @@dependency[sbt,Maven,Gradle] {
: @@@vars group="io.kamon"
``` artifact="sigar-loader"
"io.kamon" % "sigar-loader" % "$sigar_loader.version$" version="$sigar_loader.version$"
``` }
@@@
Java
: @@@vars
```
<dependency>
<groupId>io.kamon</groupId>
<artifactId>sigar-loader</artifactId>
<version>$sigar_loader.version$</version>
</dependency>
```
@@@
You can download Kamon sigar-loader from [Maven Central](http://search.maven.org/#search%7Cga%7C1%7Csigar-loader) You can download Kamon sigar-loader from [Maven Central](http://search.maven.org/#search%7Cga%7C1%7Csigar-loader)

View file

@ -427,30 +427,11 @@ different persistenceId.
To use the Cluster Sharding you must add the following dependency in your project. To use the Cluster Sharding you must add the following dependency in your project.
sbt @@dependency[sbt,Maven,Gradle] {
: @@@vars group="com.typesafe.akka"
``` artifact="akka-cluster-sharding_$scala.binary_version$"
"com.typesafe.akka" %% "akka-cluster-sharding" % "$akka.version$" version="$akka.version$"
``` }
@@@
Gradle
: @@@vars
```
compile group: 'com.typesafe.akka', name: 'akka-cluster-sharding_$scala.binary_version$', version: '$akka.version$'
```
@@@
Maven
: @@@vars
```
<dependency>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-cluster-sharding_$scala.binary_version$</artifactId>
<version>$akka.version$</version>
</dependency>
```
@@@
## Configuration ## Configuration

View file

@ -132,23 +132,11 @@ A more comprehensive sample is available in the tutorial named
To use the Cluster Singleton you must add the following dependency in your project. To use the Cluster Singleton you must add the following dependency in your project.
sbt @@dependency[sbt,Maven,Gradle] {
: @@@vars group="com.typesafe.akka"
``` artifact="akka-cluster-tools_$scala.binary_version$"
"com.typesafe.akka" %% "akka-cluster-tools" % "$akka.version$" version="$akka.version$"
``` }
@@@
Maven
: @@@vars
```
<dependency>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-cluster-tools_$scala.binary_version$</artifactId>
<version>$akka.version$</version>
</dependency>
```
@@@
## Configuration ## Configuration

View file

@ -88,7 +88,7 @@ at least **N/2 + 1** replicas, where N is the number of nodes in the cluster
(or all nodes in the cluster role group) (or all nodes in the cluster role group)
When you specify to write to `n` out of `x` nodes, the update will first replicate to `n` nodes. When you specify to write to `n` out of `x` nodes, the update will first replicate to `n` nodes.
If there are not enough Acks after 1/5th of the timeout, the update will be replicated to `n` other If there are not enough Acks after a 1/5th of the timeout, the update will be replicated to `n` other
nodes. If there are less than n nodes left all of the remaining nodes are used. Reachable nodes nodes. If there are less than n nodes left all of the remaining nodes are used. Reachable nodes
are preferred over unreachable nodes. are preferred over unreachable nodes.
@ -265,7 +265,7 @@ Java
In some rare cases, when performing an `Update` it is needed to first try to fetch latest data from In some rare cases, when performing an `Update` it is needed to first try to fetch latest data from
other nodes. That can be done by first sending a `Get` with `ReadMajority` and then continue with other nodes. That can be done by first sending a `Get` with `ReadMajority` and then continue with
the `Update` when the `GetSuccess`, `GetFailure` or `NotFound` reply is received. This might be the `Update` when the `GetSuccess`, `GetFailure` or `NotFound` reply is received. This might be
needed when you need to base a decision on latest information or when removing entries from `ORSet` needed when you need to base a decision on latest information or when removing entries from an `ORSet`
or `ORMap`. If an entry is added to an `ORSet` or `ORMap` from one node and removed from another or `ORMap`. If an entry is added to an `ORSet` or `ORMap` from one node and removed from another
node the entry will only be removed if the added entry is visible on the node where the removal is node the entry will only be removed if the added entry is visible on the node where the removal is
performed (hence the name observed-removed set). performed (hence the name observed-removed set).
@ -346,7 +346,7 @@ types that support both updates and removals, for example `ORMap` or `ORSet`.
### delta-CRDT ### delta-CRDT
[Delta State Replicated Data Types](http://arxiv.org/abs/1603.01529) [Delta State Replicated Data Types](http://arxiv.org/abs/1603.01529)
are supported. delta-CRDT is a way to reduce the need for sending the full state are supported. A delta-CRDT is a way to reduce the need for sending the full state
for updates. For example adding element `'c'` and `'d'` to set `{'a', 'b'}` would for updates. For example adding element `'c'` and `'d'` to set `{'a', 'b'}` would
result in sending the delta `{'c', 'd'}` and merge that with the state on the result in sending the delta `{'c', 'd'}` and merge that with the state on the
receiving side, resulting in set `{'a', 'b', 'c', 'd'}`. receiving side, resulting in set `{'a', 'b', 'c', 'd'}`.
@ -355,7 +355,7 @@ The protocol for replicating the deltas supports causal consistency if the data
is marked with `RequiresCausalDeliveryOfDeltas`. Otherwise it is only eventually is marked with `RequiresCausalDeliveryOfDeltas`. Otherwise it is only eventually
consistent. Without causal consistency it means that if elements `'c'` and `'d'` are consistent. Without causal consistency it means that if elements `'c'` and `'d'` are
added in two separate *Update* operations these deltas may occasionally be propagated added in two separate *Update* operations these deltas may occasionally be propagated
to nodes in different order than the causal order of the updates. For this example it to nodes in a different order to the causal order of the updates. For this example it
can result in that set `{'a', 'b', 'd'}` can be seen before element 'c' is seen. Eventually can result in that set `{'a', 'b', 'd'}` can be seen before element 'c' is seen. Eventually
it will be `{'a', 'b', 'c', 'd'}`. it will be `{'a', 'b', 'c', 'd'}`.
@ -393,7 +393,7 @@ each node.
If you need both increments and decrements you can use the `PNCounter` (positive/negative counter). If you need both increments and decrements you can use the `PNCounter` (positive/negative counter).
It is tracking the increments (P) separate from the decrements (N). Both P and N are represented It is tracking the increments (P) separate from the decrements (N). Both P and N are represented
as two internal `GCounter`. Merge is handled by merging the internal P and N counters. as two internal `GCounter`s. Merge is handled by merging the internal P and N counters.
The value of the counter is the value of the P counter minus the value of the N counter. The value of the counter is the value of the P counter minus the value of the N counter.
Scala Scala
@ -785,30 +785,11 @@ paper by Mark Shapiro et. al.
To use Distributed Data you must add the following dependency in your project. To use Distributed Data you must add the following dependency in your project.
sbt @@dependency[sbt,Maven,Gradle] {
: @@@vars group="com.typesafe.akka"
``` artifact="akka-distributed-data_$scala.binary_version$"
"com.typesafe.akka" %% "akka-distributed-data" % "$akka.version$" version="$akka.version$"
``` }
@@@
Gradle
: @@@vars
```
compile group: 'com.typesafe.akka', name: 'akka-distributed-data_$scala.binary_version$', version: '$akka.version$'
```
@@@
Maven
: @@@vars
```
<dependency>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-distributed-data_$scala.binary_version$</artifactId>
<version>$akka.version$</version>
</dependency>
```
@@@
## Configuration ## Configuration

View file

@ -222,27 +222,8 @@ If you are looking for at-least-once delivery guarantee, we recommend [Kafka Akk
To use Distributed Publish Subscribe you must add the following dependency in your project. To use Distributed Publish Subscribe you must add the following dependency in your project.
sbt @@dependency[sbt,Maven,Gradle] {
: @@@vars group="com.typesafe.akka"
``` artifact="akka-cluster-tools_$scala.binary_version$"
"com.typesafe.akka" %% "akka-cluster-tools" % "$akka.version$" version="$akka.version$"
``` }
@@@
Gradle
: @@@vars
```
compile group: 'com.typesafe.akka', name: 'akka-cluster-tools_$scala.binary_version$', version: '$akka.version$'
```
@@@
Maven
: @@@vars
```
<dependency>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-cluster-tools_$scala.binary_version$</artifactId>
<version>$akka.version$</version>
</dependency>
```
@@@

View file

@ -339,20 +339,11 @@ stdout logger is `WARNING` and it can be silenced completely by setting
Akka provides a logger for [SLF4J](http://www.slf4j.org/). This module is available in the 'akka-slf4j.jar'. Akka provides a logger for [SLF4J](http://www.slf4j.org/). This module is available in the 'akka-slf4j.jar'.
It has a single dependency: the slf4j-api jar. In your runtime, you also need a SLF4J backend. We recommend [Logback](http://logback.qos.ch/): It has a single dependency: the slf4j-api jar. In your runtime, you also need a SLF4J backend. We recommend [Logback](http://logback.qos.ch/):
sbt @@dependency[sbt,Maven,Gradle] {
: ```scala group="ch.qos.logback"
libraryDependencies += "ch.qos.logback" % "logback-classic" % "1.2.3" artifact="logback-classic"
``` version="1.2.3"
}
Maven
: ```xml
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.2.3</version>
</dependency>
```
You need to enable the Slf4jLogger in the `loggers` element in You need to enable the Slf4jLogger in the `loggers` element in
the @ref:[configuration](general/configuration.md). Here you can also define the log level of the event bus. the @ref:[configuration](general/configuration.md). Here you can also define the log level of the event bus.

View file

@ -8,30 +8,11 @@ Note that implementations for other journals may have different semantics.
Akka persistence LevelDB query implementation is bundled in the `akka-persistence-query` artifact. Akka persistence LevelDB query implementation is bundled in the `akka-persistence-query` artifact.
Make sure that you have the following dependency in your project: Make sure that you have the following dependency in your project:
sbt @@dependency[sbt,Maven,Gradle] {
: @@@vars group="com.typesafe.akka"
``` artifact="akka-persistence-query_$scala.binary_version$"
"com.typesafe.akka" %% "akka-persistence-query" % "$akka.version$" version="$akka.version$"
``` }
@@@
Gradle
: @@@vars
```
compile group: 'com.typesafe.akka', name: 'akka-persistence-query_$scala.binary_version$', version: '$akka.version$'
```
@@@
Maven
: @@@vars
```
<dependency>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-persistence-query_$scala.binary_version$</artifactId>
<version>$akka.version$</version>
</dependency>
```
@@@
## How to get the ReadJournal ## How to get the ReadJournal

View file

@ -14,30 +14,11 @@ recommend (in the spirit of CQRS) of splitting up the write/read sides into sepa
Akka persistence query is a separate jar file. Make sure that you have the following dependency in your project: Akka persistence query is a separate jar file. Make sure that you have the following dependency in your project:
sbt @@dependency[sbt,Maven,Gradle] {
: @@@vars group="com.typesafe.akka"
``` artifact="akka-persistence-query_$scala.binary_version$"
"com.typesafe.akka" %% "akka-persistence-query" % "$akka.version$" version="$akka.version$"
``` }
@@@
Gradle
: @@@vars
```
compile group: 'com.typesafe.akka', name: 'akka-persistence-query_$scala.binary_version$', version: '$akka.version$'
```
@@@
Maven
: @@@vars
```
<dependency>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-persistence-query_$scala.binary_version$</artifactId>
<version>$akka.version$</version>
</dependency>
```
@@@
## Design overview ## Design overview

View file

@ -1128,31 +1128,11 @@ In order to help developers build correct and high quality storage plugins, we p
The TCK is usable from Java as well as Scala projects. To test your implementation (independently of language) you need to include the akka-persistence-tck dependency: The TCK is usable from Java as well as Scala projects. To test your implementation (independently of language) you need to include the akka-persistence-tck dependency:
sbt @@dependency[sbt,Maven,Gradle] {
: @@@vars group="com.typesafe.akka"
``` artifact="akka-persistence-tck_$scala.binary_version$"
"com.typesafe.akka" %% "akka-persistence-tck" % "$akka.version$" % "test" version="$akka.version$"
``` }
@@@
Gradle
: @@@vars
```
testCompile group: 'com.typesafe.akka', name: 'akka-persistence-tck_$scala.binary_version$', version: '$akka.version$'
```
@@@
Maven
: @@@vars
```
<dependency>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-persistence-tck_$scala.binary_version$</artifactId>
<version>$akka.version$</version>
<scope>test</scope>
</dependency>
```
@@@
To include the Journal TCK tests in your test suite simply extend the provided @scala[`JournalSpec`]@java[`JavaJournalSpec`]: To include the Journal TCK tests in your test suite simply extend the provided @scala[`JournalSpec`]@java[`JavaJournalSpec`]:
@ -1204,30 +1184,11 @@ instance. Enable this plugin by defining config property:
LevelDB based plugins will also require the following additional dependency declaration: LevelDB based plugins will also require the following additional dependency declaration:
sbt @@dependency[sbt,Maven,Gradle] {
: @@@vars group="org.fusesource.leveldbjni"
``` artifact="leveldbjni-all"
"org.fusesource.leveldbjni" % "leveldbjni-all" % "1.8" version="1.8"
``` }
@@@
Gradle
: @@@vars
```
compile group: 'org.fusesource.leveldbjni', name: 'leveldbjni-all', version: '1.8'
```
@@@
Maven
: @@@vars
```
<dependency>
<groupId>org.fusesource.leveldbjni</groupId>
<artifactId>leveldbjni-all</artifactId>
<version>1.8</version>
</dependency>
```
@@@
The default location of LevelDB files is a directory named `journal` in the current working The default location of LevelDB files is a directory named `journal` in the current working
directory. This location can be changed by configuration where the specified path can be relative or absolute: directory. This location can be changed by configuration where the specified path can be relative or absolute:
@ -1378,31 +1339,11 @@ in your Akka configuration. The LevelDB Java port is for testing purposes only.
Also note that for the LevelDB Java port, you will need the following dependencies: Also note that for the LevelDB Java port, you will need the following dependencies:
sbt @@dependency[sbt,Maven,Gradle] {
: @@@vars group="org.iq80.leveldb"
``` artifact="leveldb"
"org.iq80.leveldb" % "leveldb" % "0.9" % "test" version="0.9"
``` }
@@@
Gradle
: @@@vars
```
testCompile group: 'org.iq80.leveldb', name: 'leveldb', version: '0.9'
```
@@@
Maven
: @@@vars
```
<dependency>
<groupId>org.iq80.leveldb</groupId>
<artifactId>leveldb</artifactId>
<version>0.9</version>
<scope>test</scope>
</dependency>
```
@@@
@@@ warning @@@ warning

View file

@ -52,24 +52,11 @@ are also different.
The Akka remoting is a separate jar file. Make sure that you have the following dependency in your project: The Akka remoting is a separate jar file. Make sure that you have the following dependency in your project:
Scala @@dependency[sbt,Maven,Gradle] {
: @@@vars group="com.typesafe.akka"
``` artifact="akka-remote_$scala.binary_version$"
"com.typesafe.akka" %% "akka-remote" % "$akka.version$" version="$akka.version$"
``` }
@@@
Java
: @@@vars
```
<dependency>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-remote_$scala.binary_version$</artifactId>
<version>$akka.version$</version>
</dependency>
```
@@@
To enable remote capabilities in your Akka project you should, at a minimum, add the following changes To enable remote capabilities in your Akka project you should, at a minimum, add the following changes
to your `application.conf` file: to your `application.conf` file:

View file

@ -20,21 +20,11 @@ network and/or Akka configuration will have to be changed as described in
The Akka remoting is a separate jar file. Make sure that you have the following dependency in your project: The Akka remoting is a separate jar file. Make sure that you have the following dependency in your project:
@@@vars @@dependency[sbt,Maven,Gradle] {
sbt group="com.typesafe.akka"
: ``` artifact="akka-remote_$scala.binary_version$"
"com.typesafe.akka" %% "akka-remote" % "$akka.version$" version="$akka.version$"
``` }
Maven
: ```
<dependency>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-remote_$scala.binary_version$</artifactId>
<version>$akka.version$</version>
</dependency>
```
@@@
To enable remote capabilities in your Akka project you should, at a minimum, add the following changes To enable remote capabilities in your Akka project you should, at a minimum, add the following changes
to your `application.conf` file: to your `application.conf` file: