---
metadata:
  - name: generator
    content: Diplodoc Platform v5.54.5
alternate:
  - https://catboost.ai/docs/en/installation/spark-installation-maven.md
  - href: en/installation/spark-installation-maven.md
    type: text/markdown
    title: Markdown version
  - href: ../llms.txt
    type: text/markdown
    title: llms.txt
---
> **Documentation Index:** Fetch the complete configuration index at https://catboost.ai/docs/en/llms.txt

# For Maven projects

<!-- source: en/_includes/work_src/reusage-installation/spark__dep-versions.md -->
Get the appropriate `catboost_spark_version` (see available versions at [Maven central](https://search.maven.org/search?q=catboost-spark)).

Choose the appropriate `spark_compat_version` (`2.x`, `3.x`, or `4.x` where `x` is a minor release version) and `scala_compat_version` (`2.11`, `2.12` or `2.13`, corresponding to versions supported by the particular Spark version).
<!-- endsource: en/_includes/work_src/reusage-installation/spark__dep-versions.md -->

Add to the following to `pom.xml` of your project :

```
  <properties>
    ...
    <spark.compat.version>spark_compat_version</spark.compat.version>
    <scala.compat.version>scala_compat_version</scala.compat.version>
    ...
  </properties>

  <dependencies>
    ...
    <dependency>
      <groupId>ai.catboost</groupId>
      <artifactId>catboost-spark_${spark.compat.version}_${scala.compat.version}</artifactId>
      <version>catboost_spark_version</version>
    </dependency>
   ...
```
