catboost/docs/en/installation/spark-installation-build-from-source-maven.md
{% note warning %}
{% include ya-make-to-cmake-switch %}
Select the appropriate build environment setup below accordingly.
{% endnote %}
Linux or macOS. Windows support in progress.
Set up build environment depending on build type:
Python. 3.6+
Maven 3.3.9+
JDK
JDK version depends on Apache Spark version:
Set JAVA_HOME environment variable to point to the path of JDK installation
[Only for Ya Make] SWIG 4.0.2+
Cmake-based build uses SWIG from Conan packages so an explicit installation is not required.
Clone the repository:
git clone https://github.com/catboost/catboost.git
Go to the catboost/catboost/spark/catboost4j-spark directory from the local copy of the CatBoost repository.
Run python ./generate_projects/generate.py to generate Maven projects for all supported Spark and Scala versions combinations.
Go to the sub-directories ./projects/spark_<spark_compat_version>_<scala_compat_version> for spark_compat_version and scala_compat_version you are interested in.
Use the usual maven build phases in these directories.