You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@toree.apache.org by lr...@apache.org on 2026/09/22 13:36:52 UTC

(incubator-toree) 02/03: Stop hardcoding 2.12 in README assembly jar examples

This is an automated email from the ASF dual-hosted git repository.

lresende pushed a commit to branch revert-apache-jar-prefix
in repository https://gitbox.apache.org/repos/asf/incubator-toree.git

commit 213c81b84925ceca3b9987dc156efdc278381046
Author: Luciano Resende <lr...@apple.com>
AuthorDate: Tue Sep 22 13:46:13 2026 +0200

    Stop hardcoding 2.12 in README assembly jar examples
    
    The build itself already derives the Scala binary version dynamically
    (assemblyJarName uses scalaBinaryVersion.value; the Makefile and
    release-build.sh key off SCALA_VERSION), but the README examples
    spelled out scala-2.12 and _2.12 literally, which reads as fixed to
    that version. Replace with a <SCALA_VERSION> placeholder, consistent
    with the existing <VERSION> placeholder, and note that it is 2.12 by
    default or 2.13 when built with SCALA_VERSION=2.13.
---
 README.md | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/README.md b/README.md
index 402ba4f1..167adddc 100644
--- a/README.md
+++ b/README.md
@@ -86,19 +86,23 @@ NOTE: `make release` uses `docker`. Please refer to `docker` installation instru
 
 ## Building Individual Components
 
+`<SCALA_VERSION>` below is the Scala binary version being built against —
+`2.12` by default, or `2.13` when built with `SCALA_VERSION=2.13` (see
+`crossScalaVersions` in `build.sbt`).
+
 ### Main Toree Assembly
 To build just the main Toree assembly jar (without spark-monitor-plugin):
 ```
 sbt assembly
 ```
-This creates: `target/scala-2.12/toree-assembly_2.12-<VERSION>.jar`
+This creates: `target/scala-<SCALA_VERSION>/toree-assembly_<SCALA_VERSION>-<VERSION>.jar`
 
 ### Spark Monitor Plugin
 To build the spark-monitor-plugin as a separate jar:
 ```
 sbt sparkMonitorPlugin/assembly
 ```
-This creates: `spark-monitor-plugin/target/scala-2.12/toree-spark-monitor-plugin-assembly_2.12-<VERSION>.jar`
+This creates: `spark-monitor-plugin/target/scala-<SCALA_VERSION>/toree-spark-monitor-plugin-assembly_<SCALA_VERSION>-<VERSION>.jar`
 
 ### Build All Components
 To compile all projects including both the main assembly and spark-monitor-plugin:
@@ -115,23 +119,23 @@ To enable the Spark Monitor Plugin in your Toree application, you need to specif
 ### Option 1: Command Line Parameter
 ```bash
 # Start Toree with spark-monitor-plugin enabled
-java -jar target/scala-2.12/toree-assembly_2.12-<VERSION>.jar --magic-url file:///path/to/spark-monitor-plugin/target/scala-2.12/toree-spark-monitor-plugin-assembly_2.12-<VERSION>.jar [other-options]
+java -jar target/scala-<SCALA_VERSION>/toree-assembly_<SCALA_VERSION>-<VERSION>.jar --magic-url file:///path/to/spark-monitor-plugin/target/scala-<SCALA_VERSION>/toree-spark-monitor-plugin-assembly_<SCALA_VERSION>-<VERSION>.jar [other-options]
 ```
 
 ### Option 2: Jupyter Kernel Installation
 When installing Toree as a Jupyter kernel, you can specify the plugin:
 ```bash
-jupyter toree install --spark_home=<YOUR_SPARK_PATH> --kernel_name=toree_with_monitor --toree_opts="--magic-url file:///path/to/toree-spark-monitor-plugin-assembly_2.12-<VERSION>.jar"
+jupyter toree install --spark_home=<YOUR_SPARK_PATH> --kernel_name=toree_with_monitor --toree_opts="--magic-url file:///path/to/toree-spark-monitor-plugin-assembly_<SCALA_VERSION>-<VERSION>.jar"
 ```
 
 ### Option 3: Configuration File
 You can also specify the plugin in a configuration file and use the `--profile` option:
 ```json
 {
-  "magic_urls": ["file:///path/to/toree-spark-monitor-plugin-assembly_2.12-<VERSION>.jar"]
+  "magic_urls": ["file:///path/to/toree-spark-monitor-plugin-assembly_<SCALA_VERSION>-<VERSION>.jar"]
 }
 ```
-Then start with: `java -jar toree-assembly_2.12-<VERSION>.jar --profile config.json`
+Then start with: `java -jar toree-assembly_<SCALA_VERSION>-<VERSION>.jar --profile config.json`
 
 **Important**:
 - Make sure to use the absolute path to the spark-monitor-plugin JAR file and ensure the JAR is accessible from the location where Toree is running.