Skip to content

DOCSP-48094: BOM #663

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Mar 31, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 18 additions & 6 deletions source/get-started.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,18 +70,26 @@ its dependencies in your development environment.
or `Creating New Gradle Builds <https://guides.gradle.org/creating-new-gradle-builds/>`__
to learn how to set up your project.

.. step:: Add the {+driver-short+} Bill of Materials

.. _java-get-started-install-bom:

.. sharedinclude:: dbx/jvm/bom.rst

.. replacement:: gradle-filename

``build.gradle``

.. step:: Install the {+driver-short+}

In your IDE, create a new `Maven <https://maven.apache.org/>`__ or `Gradle <https://gradle.org/>`__
project. If you use Maven, add the following code to your ``pom.xml`` dependencies list:
If you use Maven, add the following code to your ``pom.xml`` dependencies list:

.. code-block:: xml

<dependencies>
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>mongodb-driver-sync</artifactId>
<version>{+full-version+}</version>
</dependency>
</dependencies>

Expand All @@ -90,13 +98,17 @@ its dependencies in your development environment.
.. code-block:: groovy

dependencies {
implementation 'org.mongodb:mongodb-driver-sync:{+full-version+}'
implementation 'org.mongodb:mongodb-driver-sync'
}

Because you installed the BOM, you can omit a version in the
{+driver-short+} dependency entry. The version you specify in the
BOM determines the dependency versions to install.

After you configure your dependencies, ensure they are available to your
project by running your dependency manager and refreshing
the project in your IDE.

After you complete these steps, you have a new project
and the driver dependencies installed.

Expand Down Expand Up @@ -247,4 +259,4 @@ visiting the following guides:
- :ref:`java-db-coll`: Learn more about interacting with
MongoDB databases and collections.
- :ref:`java-integrations`: Learn about the third-party
integrations that you can use with the {+driver-short+}.
integrations that you can use with the {+driver-short+}.
4 changes: 4 additions & 0 deletions source/references/whats-new.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ and features:

.. sharedinclude:: dbx/jvm/v5.4-wn-items.rst

.. replacement:: install-bom-link

the :ref:`Add the {+driver-short+} Bill of Materials <java-get-started-install-bom>` step of the Get Started tutorial

.. replacement:: sort-option-link

the :ref:`java-sync-client-bulk-write-update` and
Expand Down
Loading