Skip to content

Commit 6a198b5

Browse files
committed
[java] Avoiding pulling same netty dependencies for AsyncHttpClient
Fixes #11153. Bazel by default the coursier rules to resolve versions in case of conflicts https://github.com/bazelbuild/rules_jvm_external#resolving-user-specified-and-transitive-dependency-version-conflicts. So the way versioning is currently with Netty transport, it picks up the version of the explicit Netty transport dependencies.
1 parent 837dfe7 commit 6a198b5

File tree

4 files changed

+1222
-550
lines changed

4 files changed

+1222
-550
lines changed

java/maven_deps.bzl

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,15 @@ def selenium_java_deps():
8383
"net.sourceforge.htmlunit:htmlunit-core-js:2.65.0",
8484
"org.apache.commons:commons-exec:1.3",
8585
"org.assertj:assertj-core:3.23.1",
86-
"org.asynchttpclient:async-http-client:2.12.3",
86+
maven.artifact(
87+
group = "org.asynchttpclient",
88+
artifact = "async-http-client",
89+
version = "2.12.3",
90+
exclusions = [
91+
"io.netty:netty-transport-native-epoll",
92+
"io.netty:netty-transport-native-kqueue",
93+
],
94+
),
8795
"org.eclipse.mylyn.github:org.eclipse.egit.github.core:2.1.5",
8896
"org.hamcrest:hamcrest:2.2",
8997
"org.hsqldb:hsqldb:2.7.1",
@@ -116,4 +124,5 @@ def selenium_java_deps():
116124
"https://maven.google.com",
117125
],
118126
maven_install_json = "@selenium//java:maven_install.json",
127+
version_conflict_policy = "pinned",
119128
)

java/maven_install.json

Lines changed: 41 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
{
22
"dependency_tree": {
33
"__AUTOGENERATED_FILE_DO_NOT_MODIFY_THIS_FILE_MANUALLY": "THERE_IS_NO_DATA_ONLY_ZUUL",
4-
"__INPUT_ARTIFACTS_HASH": 155949809,
5-
"__RESOLVED_ARTIFACTS_HASH": -955297213,
6-
"conflict_resolution": {
7-
"net.sourceforge.htmlunit:htmlunit-core-js:2.65.0": "net.sourceforge.htmlunit:htmlunit-core-js:2.66.0"
8-
},
4+
"__INPUT_ARTIFACTS_HASH": 1043079859,
5+
"__RESOLVED_ARTIFACTS_HASH": -698163248,
6+
"conflict_resolution": {},
97
"dependencies": [
108
{
119
"coord": "com.barchart.udt:barchart-udt-bundle:2.3.0",
@@ -1285,9 +1283,11 @@
12851283
"dependencies": [],
12861284
"directDependencies": [],
12871285
"exclusions": [
1288-
"org.hamcrest:hamcrest-all",
1286+
"io.netty:netty-transport-native-kqueue",
1287+
"io.netty:netty-all",
12891288
"org.hamcrest:hamcrest-core",
1290-
"io.netty:netty-all"
1289+
"io.netty:netty-transport-native-epoll",
1290+
"org.hamcrest:hamcrest-all"
12911291
],
12921292
"file": "v1/https/repo1.maven.org/maven2/com/sun/activation/jakarta.activation/1.2.2/jakarta.activation-1.2.2.jar",
12931293
"mirror_urls": [
@@ -1307,9 +1307,11 @@
13071307
"dependencies": [],
13081308
"directDependencies": [],
13091309
"exclusions": [
1310-
"org.hamcrest:hamcrest-all",
1310+
"io.netty:netty-transport-native-kqueue",
1311+
"io.netty:netty-all",
13111312
"org.hamcrest:hamcrest-core",
1312-
"io.netty:netty-all"
1313+
"io.netty:netty-transport-native-epoll",
1314+
"org.hamcrest:hamcrest-all"
13131315
],
13141316
"file": "v1/https/repo1.maven.org/maven2/com/sun/activation/jakarta.activation/1.2.2/jakarta.activation-1.2.2-sources.jar",
13151317
"mirror_urls": [
@@ -1331,9 +1333,11 @@
13311333
"org.reactivestreams:reactive-streams:1.0.4"
13321334
],
13331335
"exclusions": [
1334-
"org.hamcrest:hamcrest-all",
1336+
"io.netty:netty-transport-native-kqueue",
1337+
"io.netty:netty-all",
13351338
"org.hamcrest:hamcrest-core",
1336-
"io.netty:netty-all"
1339+
"io.netty:netty-transport-native-epoll",
1340+
"org.hamcrest:hamcrest-all"
13371341
],
13381342
"file": "v1/https/repo1.maven.org/maven2/com/typesafe/netty/netty-reactive-streams/2.0.4/netty-reactive-streams-2.0.4.jar",
13391343
"mirror_urls": [
@@ -1357,9 +1361,11 @@
13571361
"org.reactivestreams:reactive-streams:jar:sources:1.0.4"
13581362
],
13591363
"exclusions": [
1360-
"org.hamcrest:hamcrest-all",
1364+
"io.netty:netty-transport-native-kqueue",
1365+
"io.netty:netty-all",
13611366
"org.hamcrest:hamcrest-core",
1362-
"io.netty:netty-all"
1367+
"io.netty:netty-transport-native-epoll",
1368+
"org.hamcrest:hamcrest-all"
13631369
],
13641370
"file": "v1/https/repo1.maven.org/maven2/com/typesafe/netty/netty-reactive-streams/2.0.4/netty-reactive-streams-2.0.4-sources.jar",
13651371
"mirror_urls": [
@@ -4566,18 +4572,18 @@
45664572
"url": "https://repo1.maven.org/maven2/net/sf/saxon/Saxon-HE/11.4/Saxon-HE-11.4-sources.jar"
45674573
},
45684574
{
4569-
"coord": "net.sourceforge.htmlunit:htmlunit-core-js:2.66.0",
4575+
"coord": "net.sourceforge.htmlunit:htmlunit-core-js:2.65.0",
45704576
"dependencies": [],
45714577
"directDependencies": [],
45724578
"exclusions": [
45734579
"org.hamcrest:hamcrest-all",
45744580
"org.hamcrest:hamcrest-core",
45754581
"io.netty:netty-all"
45764582
],
4577-
"file": "v1/https/repo1.maven.org/maven2/net/sourceforge/htmlunit/htmlunit-core-js/2.66.0/htmlunit-core-js-2.66.0.jar",
4583+
"file": "v1/https/repo1.maven.org/maven2/net/sourceforge/htmlunit/htmlunit-core-js/2.65.0/htmlunit-core-js-2.65.0.jar",
45784584
"mirror_urls": [
4579-
"https://repo1.maven.org/maven2/net/sourceforge/htmlunit/htmlunit-core-js/2.66.0/htmlunit-core-js-2.66.0.jar",
4580-
"https://maven.google.com/net/sourceforge/htmlunit/htmlunit-core-js/2.66.0/htmlunit-core-js-2.66.0.jar"
4585+
"https://repo1.maven.org/maven2/net/sourceforge/htmlunit/htmlunit-core-js/2.65.0/htmlunit-core-js-2.65.0.jar",
4586+
"https://maven.google.com/net/sourceforge/htmlunit/htmlunit-core-js/2.65.0/htmlunit-core-js-2.65.0.jar"
45814587
],
45824588
"packages": [
45834589
"net.sourceforge.htmlunit.corejs.classfile",
@@ -4601,26 +4607,26 @@
46014607
"net.sourceforge.htmlunit.corejs.javascript.v8dtoa",
46024608
"net.sourceforge.htmlunit.corejs.javascript.xml"
46034609
],
4604-
"sha256": "501c6882ec3120ea6770e56c387fbaa0dffaf23aeb866687a41bc7f2c2c68e9a",
4605-
"url": "https://repo1.maven.org/maven2/net/sourceforge/htmlunit/htmlunit-core-js/2.66.0/htmlunit-core-js-2.66.0.jar"
4610+
"sha256": "77be7ed66a4cf54fa04dee6cd5b3e2f8ef51e8461f9ebfcc60c0274e5e7b4d6f",
4611+
"url": "https://repo1.maven.org/maven2/net/sourceforge/htmlunit/htmlunit-core-js/2.65.0/htmlunit-core-js-2.65.0.jar"
46064612
},
46074613
{
4608-
"coord": "net.sourceforge.htmlunit:htmlunit-core-js:jar:sources:2.66.0",
4614+
"coord": "net.sourceforge.htmlunit:htmlunit-core-js:jar:sources:2.65.0",
46094615
"dependencies": [],
46104616
"directDependencies": [],
46114617
"exclusions": [
46124618
"org.hamcrest:hamcrest-all",
46134619
"org.hamcrest:hamcrest-core",
46144620
"io.netty:netty-all"
46154621
],
4616-
"file": "v1/https/repo1.maven.org/maven2/net/sourceforge/htmlunit/htmlunit-core-js/2.66.0/htmlunit-core-js-2.66.0-sources.jar",
4622+
"file": "v1/https/repo1.maven.org/maven2/net/sourceforge/htmlunit/htmlunit-core-js/2.65.0/htmlunit-core-js-2.65.0-sources.jar",
46174623
"mirror_urls": [
4618-
"https://repo1.maven.org/maven2/net/sourceforge/htmlunit/htmlunit-core-js/2.66.0/htmlunit-core-js-2.66.0-sources.jar",
4619-
"https://maven.google.com/net/sourceforge/htmlunit/htmlunit-core-js/2.66.0/htmlunit-core-js-2.66.0-sources.jar"
4624+
"https://repo1.maven.org/maven2/net/sourceforge/htmlunit/htmlunit-core-js/2.65.0/htmlunit-core-js-2.65.0-sources.jar",
4625+
"https://maven.google.com/net/sourceforge/htmlunit/htmlunit-core-js/2.65.0/htmlunit-core-js-2.65.0-sources.jar"
46204626
],
46214627
"packages": [],
4622-
"sha256": "d40a7a07dfd6df80148171a362b39a9f6082bd0d026c226d3493da74f31df4d7",
4623-
"url": "https://repo1.maven.org/maven2/net/sourceforge/htmlunit/htmlunit-core-js/2.66.0/htmlunit-core-js-2.66.0-sources.jar"
4628+
"sha256": "48eec0786025d3eb77b6dd7526a9b6e32c848b8f00938b96617cdd4d39afcf77",
4629+
"url": "https://repo1.maven.org/maven2/net/sourceforge/htmlunit/htmlunit-core-js/2.65.0/htmlunit-core-js-2.65.0-sources.jar"
46244630
},
46254631
{
46264632
"coord": "net.sourceforge.htmlunit:htmlunit-cssparser:1.12.0",
@@ -4723,7 +4729,7 @@
47234729
"commons-io:commons-io:2.10.0",
47244730
"commons-logging:commons-logging:1.2",
47254731
"commons-net:commons-net:3.8.0",
4726-
"net.sourceforge.htmlunit:htmlunit-core-js:2.66.0",
4732+
"net.sourceforge.htmlunit:htmlunit-core-js:2.65.0",
47274733
"net.sourceforge.htmlunit:htmlunit-cssparser:1.12.0",
47284734
"net.sourceforge.htmlunit:htmlunit-xpath:2.66.0",
47294735
"net.sourceforge.htmlunit:neko-htmlunit:2.66.0",
@@ -4749,7 +4755,7 @@
47494755
"commons-io:commons-io:2.10.0",
47504756
"commons-logging:commons-logging:1.2",
47514757
"commons-net:commons-net:3.8.0",
4752-
"net.sourceforge.htmlunit:htmlunit-core-js:2.66.0",
4758+
"net.sourceforge.htmlunit:htmlunit-core-js:2.65.0",
47534759
"net.sourceforge.htmlunit:htmlunit-cssparser:1.12.0",
47544760
"net.sourceforge.htmlunit:htmlunit-xpath:2.66.0",
47554761
"net.sourceforge.htmlunit:neko-htmlunit:2.66.0",
@@ -4840,7 +4846,7 @@
48404846
"commons-io:commons-io:jar:sources:2.10.0",
48414847
"commons-logging:commons-logging:jar:sources:1.2",
48424848
"commons-net:commons-net:jar:sources:3.8.0",
4843-
"net.sourceforge.htmlunit:htmlunit-core-js:jar:sources:2.66.0",
4849+
"net.sourceforge.htmlunit:htmlunit-core-js:jar:sources:2.65.0",
48444850
"net.sourceforge.htmlunit:htmlunit-cssparser:jar:sources:1.12.0",
48454851
"net.sourceforge.htmlunit:htmlunit-xpath:jar:sources:2.66.0",
48464852
"net.sourceforge.htmlunit:neko-htmlunit:jar:sources:2.66.0",
@@ -4866,7 +4872,7 @@
48664872
"commons-io:commons-io:jar:sources:2.10.0",
48674873
"commons-logging:commons-logging:jar:sources:1.2",
48684874
"commons-net:commons-net:jar:sources:3.8.0",
4869-
"net.sourceforge.htmlunit:htmlunit-core-js:jar:sources:2.66.0",
4875+
"net.sourceforge.htmlunit:htmlunit-core-js:jar:sources:2.65.0",
48704876
"net.sourceforge.htmlunit:htmlunit-cssparser:jar:sources:1.12.0",
48714877
"net.sourceforge.htmlunit:htmlunit-xpath:jar:sources:2.66.0",
48724878
"net.sourceforge.htmlunit:neko-htmlunit:jar:sources:2.66.0",
@@ -5864,9 +5870,11 @@
58645870
"org.slf4j:slf4j-api:2.0.3"
58655871
],
58665872
"exclusions": [
5867-
"org.hamcrest:hamcrest-all",
5873+
"io.netty:netty-transport-native-kqueue",
5874+
"io.netty:netty-all",
58685875
"org.hamcrest:hamcrest-core",
5869-
"io.netty:netty-all"
5876+
"io.netty:netty-transport-native-epoll",
5877+
"org.hamcrest:hamcrest-all"
58705878
],
58715879
"file": "v1/https/repo1.maven.org/maven2/org/asynchttpclient/async-http-client/2.12.3/async-http-client-2.12.3.jar",
58725880
"mirror_urls": [
@@ -8179,7 +8187,7 @@
81798187
"io.opentelemetry:opentelemetry-semconv:1.19.0-alpha",
81808188
"io.ous:jtoml:2.0.0",
81818189
"net.bytebuddy:byte-buddy:1.12.18",
8182-
"net.sourceforge.htmlunit:htmlunit-core-js:2.66.0",
8190+
"net.sourceforge.htmlunit:htmlunit-core-js:2.65.0",
81838191
"net.sourceforge.htmlunit:htmlunit-cssparser:1.12.0",
81848192
"net.sourceforge.htmlunit:htmlunit-xpath:2.66.0",
81858193
"net.sourceforge.htmlunit:htmlunit:2.66.0",
@@ -8284,7 +8292,7 @@
82848292
"io.opentelemetry:opentelemetry-semconv:jar:sources:1.19.0-alpha",
82858293
"io.ous:jtoml:jar:sources:2.0.0",
82868294
"net.bytebuddy:byte-buddy:jar:sources:1.12.18",
8287-
"net.sourceforge.htmlunit:htmlunit-core-js:jar:sources:2.66.0",
8295+
"net.sourceforge.htmlunit:htmlunit-core-js:jar:sources:2.65.0",
82888296
"net.sourceforge.htmlunit:htmlunit-cssparser:jar:sources:1.12.0",
82898297
"net.sourceforge.htmlunit:htmlunit-xpath:jar:sources:2.66.0",
82908298
"net.sourceforge.htmlunit:htmlunit:jar:sources:2.66.0",

0 commit comments

Comments
 (0)