Skip to content

Commit cb9169a

Browse files
committed
[build] update maven dependencies with java:update
1 parent a81b4d0 commit cb9169a

File tree

2 files changed

+7
-26
lines changed

2 files changed

+7
-26
lines changed

README.md

Lines changed: 6 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ before submitting your pull requests.
2828

2929
## Installing
3030

31-
These are the requirements to cereate your own local dev environment to contribute to Selenium.
31+
These are the requirements to create your own local dev environment to contribute to Selenium.
3232

3333
### All Platforms
3434
* [Bazelisk](https://github.com/bazelbuild/bazelisk), a Bazel wrapper that automatically downloads
@@ -168,7 +168,6 @@ there are a few steps to get it working, so read their [configuration documentat
168168
There is also an auto-formatting script that can be run: `./scripts/format.sh`
169169

170170
#### Local Installation
171-
172171
While Selenium is not built with Maven, you can build and install the Selenium pieces
173172
for Maven to use locally by deploying to your local maven repository (`~/.m2/repository`), using:
174173
```shell
@@ -177,30 +176,12 @@ for Maven to use locally by deploying to your local maven repository (`~/.m2/rep
177176

178177
#### Updating Dependencies
179178

180-
The coordinates (_groupId_:_artifactId_:_version_) of the Java dependencies
181-
are defined in the file [maven_deps.bzl](https://github.com/SeleniumHQ/selenium/blob/trunk/java/maven_deps.bzl).
182-
The process to modify these dependencies is the following:
183-
184-
1. (Optional) If we want to detect the dependencies which are not updated,
185-
we can use the following command for automatic discovery:
186-
187-
```sh
188-
bazel run @maven//:outdated
189-
```
190-
191-
2. Modify [maven_deps.bzl](https://github.com/SeleniumHQ/selenium/blob/trunk/java/maven_deps.bzl).
192-
For instance, we can bump the version of a given artifact detected in the step before.
179+
Dependencies are defined in the file [maven_deps.bzl](https://github.com/SeleniumHQ/selenium/blob/trunk/java/maven_deps.bzl).
180+
To automatically update and pin new dependencies, run:
193181

194-
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),
195-
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:
196-
197-
```sh
198-
RULES_JVM_EXTERNAL_REPIN=1 bazel run @unpinned_maven//:pin
199-
```
200-
201-
4. (Optional) If we use IntelliJ with the Bazel plugin, we need to synchronize
202-
our project. To that aim, we click on _Bazel_ → _Sync_ → _Sync Project
203-
with BUILD Files_.
182+
```shell
183+
./go java:update
184+
```
204185

205186
### Python
206187

Rakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -768,7 +768,7 @@ namespace :java do
768768
task docs: :javadocs
769769

770770
desc 'Update Maven dependencies'
771-
task :dependencies do
771+
task :update do
772772
file_path = 'java/maven_deps.bzl'
773773
content = File.read(file_path)
774774
# For some reason ./go wrapper is not outputting from Open3, so cannot use Bazel class directly

0 commit comments

Comments
 (0)