Skip to content

Commit 9c8ba9e

Browse files
davidomsohn
authored andcommitted
Bazel: Pin jcl-over-slf4j to SLF4J_VERSION
rules_jvm_external resolved org.slf4j:jcl-over-slf4j to 1.7.36 via transitive dependencies, while slf4j-api and slf4j-simple are pinned to 2.0.17. This resulted in a mixed SLF4J 1.x/2.x setup on the classpath, which can lead to runtime conflicts. Add jcl-over-slf4j as an explicit artifact in maven.install to align the SLF4J bridge with the rest of the logging stack and ensure a consistent dependency graph. Test Plan: bazel query --output=build @external_deps//:org_slf4j_jcl_over_slf4j Also pin this artefact to SLF4J_VERSION in the maven build by adding a corresponding entry under dependencyManagement. Test Plan: $ mvn dependency:tree -Dincludes=org.slf4j:jcl-over-slf4j Also add this transitive dependency to the target platforms and the p2 repository. Change-Id: I1e9e15ac3b2675e624384763dc8c4212a75d656e
1 parent d4ceb3f commit 9c8ba9e

File tree

10 files changed

+60
-6
lines changed

10 files changed

+60
-6
lines changed

MODULE.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ maven.install(
8181
"org.openjdk.jmh:jmh-core:" + JMH_VERSION,
8282
"org.openjdk.jmh:jmh-generator-annprocess:" + JMH_VERSION,
8383
"org.slf4j:slf4j-api:" + SLF4J_VERSION,
84+
"org.slf4j:jcl-over-slf4j:" + SLF4J_VERSION,
8485
"org.slf4j:slf4j-simple:" + SLF4J_VERSION,
8586
"org.tukaani:xz:1.11",
8687
],

org.eclipse.jgit.packaging/org.eclipse.jgit.repository/category.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,12 @@
216216
<bundle id="slf4j.simple.source">
217217
<category name="JGit-dependency-bundles"/>
218218
</bundle>
219+
<bundle id="jcl.over.slf4j">
220+
<category name="JGit-dependency-bundles"/>
221+
</bundle>
222+
<bundle id="jcl.over.slf4j.source">
223+
<category name="JGit-dependency-bundles"/>
224+
</bundle>
219225
<bundle id="org.tukaani.xz">
220226
<category name="JGit-dependency-bundles"/>
221227
</bundle>

org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.34.target

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
22
<?pde?>
33
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
4-
<target name="jgit-4.34" sequenceNumber="1771451400">
4+
<target name="jgit-4.34" sequenceNumber="1772188163">
55
<locations>
66
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
77
<unit id="com.jcraft.jsch" version="0.1.55.v20230916-1400"/>
@@ -58,6 +58,12 @@
5858
<version>2.0.17</version>
5959
<type>jar</type>
6060
</dependency>
61+
<dependency>
62+
<groupId>org.slf4j</groupId>
63+
<artifactId>jcl-over-slf4j</artifactId>
64+
<version>2.0.17</version>
65+
<type>jar</type>
66+
</dependency>
6167
</dependencies>
6268
</location>
6369
<location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="sshd">

org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.35.target

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
22
<?pde?>
33
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
4-
<target name="jgit-4.35" sequenceNumber="1771451400">
4+
<target name="jgit-4.35" sequenceNumber="1772188163">
55
<locations>
66
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
77
<unit id="com.jcraft.jsch" version="0.1.55.v20230916-1400"/>
@@ -58,6 +58,12 @@
5858
<version>2.0.17</version>
5959
<type>jar</type>
6060
</dependency>
61+
<dependency>
62+
<groupId>org.slf4j</groupId>
63+
<artifactId>jcl-over-slf4j</artifactId>
64+
<version>2.0.17</version>
65+
<type>jar</type>
66+
</dependency>
6167
</dependencies>
6268
</location>
6369
<location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="sshd">

org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.36.target

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
22
<?pde?>
33
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
4-
<target name="jgit-4.36" sequenceNumber="1771451400">
4+
<target name="jgit-4.36" sequenceNumber="1772188163">
55
<locations>
66
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
77
<unit id="com.jcraft.jsch" version="0.1.55.v20230916-1400"/>
@@ -58,6 +58,12 @@
5858
<version>2.0.17</version>
5959
<type>jar</type>
6060
</dependency>
61+
<dependency>
62+
<groupId>org.slf4j</groupId>
63+
<artifactId>jcl-over-slf4j</artifactId>
64+
<version>2.0.17</version>
65+
<type>jar</type>
66+
</dependency>
6167
</dependencies>
6268
</location>
6369
<location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="sshd">

org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.37.target

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
22
<?pde?>
33
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
4-
<target name="jgit-4.37" sequenceNumber="1771451400">
4+
<target name="jgit-4.37" sequenceNumber="1772188163">
55
<locations>
66
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
77
<unit id="com.jcraft.jsch" version="0.1.55.v20230916-1400"/>
@@ -58,6 +58,12 @@
5858
<version>2.0.17</version>
5959
<type>jar</type>
6060
</dependency>
61+
<dependency>
62+
<groupId>org.slf4j</groupId>
63+
<artifactId>jcl-over-slf4j</artifactId>
64+
<version>2.0.17</version>
65+
<type>jar</type>
66+
</dependency>
6167
</dependencies>
6268
</location>
6369
<location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="sshd">

org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.38.target

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
22
<?pde?>
33
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
4-
<target name="jgit-4.38" sequenceNumber="1771451400">
4+
<target name="jgit-4.38" sequenceNumber="1772188163">
55
<locations>
66
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
77
<unit id="com.jcraft.jsch" version="0.1.55.v20230916-1400"/>
@@ -58,6 +58,12 @@
5858
<version>2.0.17</version>
5959
<type>jar</type>
6060
</dependency>
61+
<dependency>
62+
<groupId>org.slf4j</groupId>
63+
<artifactId>jcl-over-slf4j</artifactId>
64+
<version>2.0.17</version>
65+
<type>jar</type>
66+
</dependency>
6167
</dependencies>
6268
</location>
6369
<location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="sshd">

org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.39.target

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
22
<?pde?>
33
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
4-
<target name="jgit-4.39" sequenceNumber="1771451400">
4+
<target name="jgit-4.39" sequenceNumber="1772188163">
55
<locations>
66
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
77
<unit id="com.jcraft.jsch" version="0.1.55.v20230916-1400"/>
@@ -58,6 +58,12 @@
5858
<version>2.0.17</version>
5959
<type>jar</type>
6060
</dependency>
61+
<dependency>
62+
<groupId>org.slf4j</groupId>
63+
<artifactId>jcl-over-slf4j</artifactId>
64+
<version>2.0.17</version>
65+
<type>jar</type>
66+
</dependency>
6167
</dependencies>
6268
</location>
6369
<location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven" label="sshd">

org.eclipse.jgit.packaging/org.eclipse.jgit.target/maven/dependencies.tpd

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,11 @@ maven slf4j
263263
artifactId = "slf4j-simple"
264264
version = "2.0.17"
265265
}
266+
dependency {
267+
groupId = "org.slf4j"
268+
artifactId = "jcl-over-slf4j"
269+
version = "2.0.17"
270+
}
266271
}
267272

268273
maven xz

pom.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -969,6 +969,12 @@
969969
<version>${slf4j-version}</version>
970970
</dependency>
971971

972+
<dependency>
973+
<groupId>org.slf4j</groupId>
974+
<artifactId>jcl-over-slf4j</artifactId>
975+
<version>${slf4j-version}</version>
976+
</dependency>
977+
972978
<dependency>
973979
<groupId>com.google.code.gson</groupId>
974980
<artifactId>gson</artifactId>

0 commit comments

Comments
 (0)