From e5b5a9caaaf1b1fad703487dc39beade58229c27 Mon Sep 17 00:00:00 2001 From: Ruslan Iushchenko Date: Tue, 2 Feb 2021 11:37:18 +0100 Subject: [PATCH] #373 Update README about the creation of an uber jar. --- README.md | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index b4d4ba70..b4104303 100644 --- a/README.md +++ b/README.md @@ -253,16 +253,22 @@ scala> #### Creating an uber jar Gathering all dependencies manually maybe a tiresome task. A better approach would be to create a jar file that contains -all of the dependencies. +all required dependencies (an uber jar aka fat jar). -Creating an uber jar for Cobrix is very easy. Just go to a folder with one of the examples, say, `examples/spark-cobol-app`. -After that run `mvn package`. Then, copy `target/spark-cobol-app-0.0.1-SNAPSHOT.jar` to a clustrr and run: - -``` -$ spark-shell --jars spark-cobol-app-0.0.1-SNAPSHOT.jar +Creating an uber jar for Cobrix is very easy. Just clone the repository and run one of the following commands: +```sh +sbt ++2.11.12 assembly -DSPARK_VERSION=2.4.7 +sbt ++2.12.12 assembly -DSPARK_VERSION=2.4.7 +sbt ++2.12.12 assembly -DSPARK_VERSION=3.0.1 ``` -Our example pom projects are set up so an uber jar is built every time you build it using Maven. +You can collect the uber jar of `spark-cobol` either at +`spark-cobol/target/scala-2.11/` or in `spark-cobol/target/scala-2.12/` depending on the Scala version you used. + +Then, run `spark-shell` or `spark-submit` adding the fat jar as the option. +```sh +$ spark-shell --jars spark-cobol-assembly-2.2.1-SNAPSHOT.jar +``` ## Other Features