@@ -70,18 +70,26 @@ its dependencies in your development environment.
70
70
or `Creating New Gradle Builds <https://guides.gradle.org/creating-new-gradle-builds/>`__
71
71
to learn how to set up your project.
72
72
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
+
73
83
.. step:: Install the {+driver-short+}
74
84
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:
77
86
78
87
.. code-block:: xml
79
88
80
89
<dependencies>
81
90
<dependency>
82
91
<groupId>org.mongodb</groupId>
83
92
<artifactId>mongodb-driver-sync</artifactId>
84
- <version>{+full-version+}</version>
85
93
</dependency>
86
94
</dependencies>
87
95
@@ -90,13 +98,17 @@ its dependencies in your development environment.
90
98
.. code-block:: groovy
91
99
92
100
dependencies {
93
- implementation 'org.mongodb:mongodb-driver-sync:{+full-version+} '
101
+ implementation 'org.mongodb:mongodb-driver-sync'
94
102
}
95
103
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
+
96
108
After you configure your dependencies, ensure they are available to your
97
109
project by running your dependency manager and refreshing
98
110
the project in your IDE.
99
-
111
+
100
112
After you complete these steps, you have a new project
101
113
and the driver dependencies installed.
102
114
@@ -247,4 +259,4 @@ visiting the following guides:
247
259
- :ref:`java-db-coll`: Learn more about interacting with
248
260
MongoDB databases and collections.
249
261
- :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+}.
0 commit comments