Skip to content

Commit 485792c

Browse files
committed
DOCSP-48094: BOM (#663)
* DOCSP-48094: BOM * small fix * small fix * fixes * implement sharedinclude * fix link (cherry picked from commit 8f788e6)
1 parent d3faa6b commit 485792c

File tree

2 files changed

+22
-6
lines changed

2 files changed

+22
-6
lines changed

source/get-started.txt

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,18 +70,26 @@ its dependencies in your development environment.
7070
or `Creating New Gradle Builds <https://guides.gradle.org/creating-new-gradle-builds/>`__
7171
to learn how to set up your project.
7272

73+
.. step:: Add the {+driver-short+} Bill of Materials
74+
75+
.. _java-get-started-install-bom:
76+
77+
.. sharedinclude:: dbx/jvm/bom.rst
78+
79+
.. replacement:: gradle-filename
80+
81+
``build.gradle``
82+
7383
.. step:: Install the {+driver-short+}
7484

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

7887
.. code-block:: xml
7988

8089
<dependencies>
8190
<dependency>
8291
<groupId>org.mongodb</groupId>
8392
<artifactId>mongodb-driver-sync</artifactId>
84-
<version>{+full-version+}</version>
8593
</dependency>
8694
</dependencies>
8795

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

92100
dependencies {
93-
implementation 'org.mongodb:mongodb-driver-sync:{+full-version+}'
101+
implementation 'org.mongodb:mongodb-driver-sync'
94102
}
95103

104+
Because you installed the BOM, you can omit a version in the
105+
{+driver-short+} dependency entry. The version you specify in the
106+
BOM determines the dependency versions to install.
107+
96108
After you configure your dependencies, ensure they are available to your
97109
project by running your dependency manager and refreshing
98110
the project in your IDE.
99-
111+
100112
After you complete these steps, you have a new project
101113
and the driver dependencies installed.
102114

@@ -247,4 +259,4 @@ visiting the following guides:
247259
- :ref:`java-db-coll`: Learn more about interacting with
248260
MongoDB databases and collections.
249261
- :ref:`java-integrations`: Learn about the third-party
250-
integrations that you can use with the {+driver-short+}.
262+
integrations that you can use with the {+driver-short+}.

source/references/whats-new.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ and features:
4141

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

44+
.. replacement:: install-bom-link
45+
46+
the :ref:`Add the {+driver-short+} Bill of Materials <java-get-started-install-bom>` step of the Get Started tutorial
47+
4448
.. replacement:: sort-option-link
4549

4650
the :ref:`java-sync-client-bulk-write-update` and

0 commit comments

Comments
 (0)