Skip to content

Commit c50df52

Browse files
bonigarciadiemol
andauthored
Include mini tutorial about how to update Java dependencies in README (#10689)
Co-authored-by: Diego Molina <[email protected]>
1 parent ffc9551 commit c50df52

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,34 @@ skipping Selenium's own tests.
333333

334334
The maven jars should now be in your local `~/.m2/repository`.
335335

336+
## Updating Java dependencies
337+
338+
The coordinates (_groupId_:_artifactId_:_version_) of the Java dependencies
339+
are defined in the file [maven_deps.bzl](https://github.com/SeleniumHQ/selenium/blob/trunk/java/maven_deps.bzl).
340+
The process to modify these dependencies is the following:
341+
342+
1. (Optional) If we want to detect the dependencies which are not updated,
343+
we can use the following command for automatic discovery:
344+
345+
```sh
346+
bazel run @maven//:outdated
347+
```
348+
349+
2. Modify [maven_deps.bzl](https://github.com/SeleniumHQ/selenium/blob/trunk/java/maven_deps.bzl).
350+
For instance, we can bump the version of a given artifact detected in the step before.
351+
352+
3. Repin dependencies. This process is required to update the file [maven_install.json](https://github.com/SeleniumHQ/selenium/blob/trunk/java/maven_install.json),
353+
which is used to manage the Maven dependencies tree (see [rules_jvm_external](https://github.com/bazelbuild/rules_jvm_external) for further details). The command to carry out this step is the following:
354+
355+
```sh
356+
REPIN=1 bazel run @unpinned_maven//:pin
357+
```
358+
359+
4. (Optional) If we use IntelliJ with the Bazel plugin, we need to synchronize
360+
our project. To that aim, we click on _Bazel_ &rarr; _Sync_ &rarr; _Sync Project
361+
with BUILD Files_.
362+
363+
336364
## Running browser tests on Linux
337365

338366
In order to run Browser tests, you first need to install the browser-specific drivers,

0 commit comments

Comments
 (0)