Skip to content

Commit 0c78913

Browse files
committed
fix LOGBACK-1693
Signed-off-by: Ceki Gulcu <[email protected]>
1 parent 4082b45 commit 0c78913

File tree

4 files changed

+26
-12
lines changed

4 files changed

+26
-12
lines changed

logback-classic/pom.xml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -270,16 +270,12 @@
270270
<execution>
271271
<id>default-test</id>
272272
<configuration>
273-
274-
<!--<argLine>XXadd-opens ch.qos.logback.core/ch.qos.logback.core.testUtil=java.naming</argLine>-->
275-
<!--<argLine>XXadd-reads ch.qos.logback.classic=ch.qos.logback.classic/ch.qos.logback.core.testUtil XXadd-reads ch.qos.logback.core=ALL-UNNAMED</argLine>-->
273+
<!-- x-show-module-resolution -->
276274
<argLine>
277-
--show-module-resolution
278275
--add-modules jakarta.mail
279276
--add-modules jakarta.servlet
280277
--add-opens ch.qos.logback.core/ch.qos.logback.core.testUtil=java.naming
281278
--add-opens ch.qos.logback.classic/ch.qos.logback.classic.testUtil=ch.qos.logback.core
282-
--add-reads ch.qos.logback.core=org.codehaus.janino.commons.compiler,org.codehaus.janino.janino
283279
</argLine>
284280
<parallel>classes</parallel>
285281
<threadCount>8</threadCount>

logback-classic/src/main/java/module-info.java

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,20 @@
1-
module ch.qos.logback.classic {
2-
requires org.slf4j;
1+
module ch.qos.logback.classic {
2+
// requires static means optional
33
requires static java.management;
4+
5+
// used by the optional ContextJNDISelector component
6+
requires static java.naming;
7+
8+
// used by the optional LevelChangePropagator component
9+
requires static java.logging;
10+
11+
// used by the optional ContextJNDISelector, MDCInsertingServletFilter among other components
412
requires static jakarta.servlet;
13+
514
requires static jakarta.mail;
615

16+
requires org.slf4j;
17+
718
requires ch.qos.logback.core;
819
uses ch.qos.logback.classic.spi.Configurator;
920
provides org.slf4j.spi.SLF4JServiceProvider with ch.qos.logback.classic.spi.LogbackServiceProvider;

logback-core-blackbox/pom.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
</dependency>
2525

2626

27+
<!--
2728
<dependency>
2829
<groupId>jakarta.servlet</groupId>
2930
<artifactId>jakarta.servlet-api</artifactId>
@@ -34,6 +35,7 @@
3435
<artifactId>jakarta.mail-api</artifactId>
3536
<scope>compile</scope>
3637
</dependency>
38+
-->
3739

3840
<dependency>
3941
<groupId>org.codehaus.janino</groupId>

logback-core/src/main/java/module-info.java

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
module ch.qos.logback.core {
2-
requires static transitive java.sql;
3-
requires static transitive java.naming;
4-
requires static transitive java.xml;
5-
requires static transitive jakarta.mail;
2+
requires static transitive java.xml;
3+
requires static java.sql;
64

7-
// jakarta.servlet 5.0 is not modular so it cannot be declared 'transitive'
5+
// required by the optional SMTPAppenderBase component
6+
requires static java.naming;
7+
8+
// transitive _imposes_ the presence of jakarta.mail on downstream users,
9+
// let them declare it if they need it
10+
requires static jakarta.mail;
11+
12+
// jakarta.servlet 5.0 is not modular
813
requires static jakarta.servlet;
914

1015
requires static janino;

0 commit comments

Comments
 (0)