Skip to content

Commit fee2445

Browse files
committed
SCANJLIB-265 Restore compatibility with SLF4J 1.x for Maven < 4.x
1 parent 7658bdc commit fee2445

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

lib/pom.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
<name>SonarScanner Java Library</name>
1212

1313
<properties>
14-
<slf4j.version>2.0.16</slf4j.version>
14+
<!-- Don't update to slf4j 2 to continue supporting the Scanner for Maven with Maven < 4 -->
15+
<slf4j.version>1.7.36</slf4j.version>
1516
</properties>
1617

1718

@@ -116,7 +117,7 @@
116117
<dependency>
117118
<groupId>ch.qos.logback</groupId>
118119
<artifactId>logback-classic</artifactId>
119-
<version>1.5.12</version>
120+
<version>1.2.13</version>
120121
<scope>test</scope>
121122
</dependency>
122123
</dependencies>

lib/src/main/java/org/sonarsource/scanner/lib/internal/facade/forked/ScannerEngineLauncher.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ private List<String> buildArgs(Map<String, String> properties) {
111111
String javaOpts = properties.get(ScannerProperties.SCANNER_JAVA_OPTS);
112112
if (javaOpts != null) {
113113
var split = split(javaOpts);
114-
LOG.atInfo().addArgument(() -> redactSensitiveArguments(split)).log("SONAR_SCANNER_JAVA_OPTS={}");
114+
LOG.info("SONAR_SCANNER_JAVA_OPTS={}", redactSensitiveArguments(split));
115115
args.addAll(split);
116116
}
117117
args.add("-D" + OkHttpClientFactory.BC_IGNORE_USELESS_PASSWD + "=true");

0 commit comments

Comments
 (0)