You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This patch set:
+ Migrating all maven projects to sbt
+ Change Jenkinsfile to use sbt
+ Improve test-utils / Util.java so that it can readResource with "../" in filename for every ClassLoader.
+ Add file sbt from https://git.io/sbt (sbt wrapper like mvnw, from https://github.com/paulp/sbt-extras)
+ Have not remove any maven files
Change-Id: Iaac477392c28b30caa291feb7e9592b50d1b59c1
+ The two `mvn` runs are to cross-compile the Scala SDK for Scala 2.11, and 2.13
69
-
+ Couchbase only officially provides, tests and supports a Scala 2.12 build.
70
-
Our community kindly added the capability to create builds for Scala 2.11 and 2.13, and users are of course welcome to create such builds; but Couchbase cannot provide support for them.
71
-
+ When building for Scala 2.11, JDK 8 should be used. If JDK 11 is used then goal scala:doc-jar will fail
72
-
+ Default `scala.compat.`X properties are defined in file [.mvn/maven.config]
73
-
+ You can always go into one of the sub-directories like `core-io` to only build or test an
(We bundled [sbt-extra](https://github.com/paulp/sbt-extras) script at [./sbt]
65
+
so you don't need to [install sbt](https://www.scala-sbt.org/1.x/docs/Setup.html).
66
+
Of course if you have installed sbt, you can run `sbt` command instead of `./sbt`)
67
+
We use sbt for all couchbase-jvm-clients' sub projects including the java-only projects such as `core-io`, `java-client`.
68
+
69
+
+ In sbt shell, run:
70
+
-`compile` or `test` or `it:test` to compile/ test/ integration test all sub project.
71
+
-`core-io / compile` to compile only `core-io` sub-project.
72
+
-`projects` to list all sub-projects
73
+
-`project scala-client` to switch to `scala-client` sub-project. All subsequence command will be run in this active project.
74
+
-`+test` to test for all versions of Scala defined in the crossScalaVersions setting of the active project.
75
+
For example scala-client / crossScalaVersions includes 2.13.1, 2.12.10, 2.11.12.
76
+
-`testOnly com.couchbase.client.core.CoreTest` to test only the test in CoreTest test spec.
77
+
(sbt support tab completion, so you can `testOnly <tab>` to see all test spec names)
78
+
-`clean; compile` to clean and then compile (`cmd1; cmd2` is similar to run `cmd1`, and then run `cmd2`)
79
+
-`publishLocal` or `publishM2` to publish to ivy or maven local repository.
80
+
-`test:checkstyle` or `test:scalafmt` to [checkstyle](http://checkstyle.sourceforge.net/)/ [scalafmt](https://scalameta.org/scalafmt/) your java/ scala test files.
81
+
We recommend you to skim through the [Getting Started with sbt](https://www.scala-sbt.org/1.x/docs/Getting-Started.html) document.
88
82
89
83
### Branches & Release Trains
90
84
@@ -141,4 +135,4 @@ Scala code is automatically formatted on compile with the tool `scalafmt`. To m
141
135
Editor -> Code Style -> Scala, change formatter to scalafmt
142
136
and check [Reformat on file save](https://scalameta.org/scalafmt/docs/installation.html#format-on-save)
143
137
144
-
(`mvn validate` can be used from command-line to force reformat)
138
+
(`scalafmtAll` can be used from sbt shell to force reformat. See also other [scalafmt* sbt tasks](https://scalameta.org/scalafmt/docs/installation.html#task-keys))
0 commit comments