Name Date Size

..22-Jun-20214 KiB

.gitignoreH A D11-Feb-2020154

.mvn/wrapper/H11-Feb-20204 KiB

.scalafmt.confH A D11-Feb-2020172

config/H11-Feb-20204 KiB

core-io/H11-Feb-20204 KiB

core-io-deps/H11-Feb-20204 KiB

java-client/H11-Feb-20204 KiB

java-examples/H11-Feb-20204 KiB

JenkinsfileH A D11-Feb-202023.5 KiB

MakefileH A D11-Feb-2020226

mvnwH A D11-Feb-20209.8 KiB

mvnw.cmdH A D11-Feb-20206.5 KiB

pom.xmlH A D11-Feb-20209 KiB

README.mdH A D11-Feb-20203.5 KiB

scala-client/H11-Feb-20204 KiB

scala-examples/H11-Feb-20204 KiB

scala-implicits/H11-Feb-20204 KiB

test-utils/H11-Feb-20204 KiB

tracing-opentelemetry/H11-Feb-20204 KiB

tracing-opentracing/H11-Feb-20204 KiB

README.md

1# Couchbase JVM Clients
2
3This repository contains the third generation of the Couchbase SDKs on the JVM ("3.0").
4
5The SDKs are currently in a `beta` state, and should be stable to develop and experiment against. Please do not 
6use them in production until we release them as `GA` (planned for January 2020).
7
8## Overview
9
10This repository contains the following projects:
11
12 - `core-io`: the core library for all language bindings
13 - `java-client`: the Java language binding
14 - `scala-client`: the Scala language binding
15
16You'll also find utility libraries and integration components at the toplevel (i.e for tracing).
17 
18Documentation is now available for [Java](https://docs.couchbase.com/java-sdk/3.0/hello-world/start-using-sdk.html) 
19and [Scala](https://docs.couchbase.com/scala-sdk/1.0/start-using-sdk.html)
20 
21## Usage
22
23Stable releases are pushed to maven central.
24
25For Java:
26
27```xml
28<dependencies>
29    <dependency>
30        <groupId>com.couchbase.client</groupId>
31        <artifactId>java-client</artifactId>
32        <version>3.0.0</version>
33    </dependency>
34</dependencies>
35```
36
37For Scala:
38
39```xml
40<dependencies>
41    <dependency>
42        <groupId>com.couchbase.client</groupId>
43        <artifactId>scala-client_2.12</artifactId>
44        <version>1.0.0</version>
45    </dependency>
46</dependencies>
47```
48
49## Building
50You can always also just build it from source:
51
52```
53$ git clone https://github.com/couchbase/couchbase-jvm-clients.git
54$ cd couchbase-jvm-clients
55$ make
56```
57
58Yes, we need `make` because maven doesn't support the setup we need and neither does gradle. If you
59want to build for different scala versions, after the first `make` you can do this through:
60
61```
62$ mvn -Dscala.compat.version=2.12 -Dscala.compat.library.version=2.12.8 clean install
63$ mvn -Dscala.compat.version=2.11 -Dscala.compat.library.version=2.11.12 clean install
64```
65
66(The two `mvn` runs are to cross-compile the Scala SDK for Scala 2.11 and 2.12.
67
68(You can always go into one of the sub-directories like `core-io` to only build or test an 
69individual project.)
70
71Use `-DskipTests` to skip testing.
72
73### Testing 
74
75You can test like this:
76
77```
78$ mvn clean test -fae
79```
80
81### Branches & Release Trains
82
83Since this monorepo houses different versions of different artifacts, release train names have been chosen
84to identify a collection of releases that belong to the same train.
85
86These trains are named after historic computers for your delight.
87
88Tags in each branch are named `branchname-ga` for the initial GA release, and then subsequently `branchname-sr-n` for
89each service release. See the tag information for specifics of what's in there.
90
91 - [Colossus](https://en.wikipedia.org/wiki/Colossus_computer) (Initial Release 2020-01-10)
92
93| Release Train | Java-Client | Scala-Client | Core-Io | Tracing-Opentelemetry | Tracing-Opentracing |
94| ------------- | ----------- | ------------ | ------- | --------------------- | ------------------- |
95| colossus      | 3.0.x       | 1.0.x        | 2.0.x   | 0.2.x                 | 0.2.x               |
96
97### Testing Infos
98
99To cover all tests, the suite needs to be run against the following topologies, but by default it
100runs against the mock. Recommended topologies:
101
102 - 1 node, no replica
103 - 2 nodes, 1 replica
104 - 2 nodes, 2 replicas
105 
106## IDE Configuration
107
108### IntelliJ
109Scala code is automatically formatted on compile with the tool `scalafmt`.  To make IntelliJ use the same settings:
110
111Editor -> Code Style -> Scala, change formatter to scalafmt
112
113(`mvn validate` can be used from command-line to force reformat)