Skip to content

Commit

Permalink
fix LOGBACK-1693
Browse files Browse the repository at this point in the history
Signed-off-by: Ceki Gulcu <ceki@qos.ch>
  • Loading branch information
ceki committed Oct 7, 2022
1 parent 4082b45 commit 0c78913
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 12 deletions.
6 changes: 1 addition & 5 deletions logback-classic/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -270,16 +270,12 @@
<execution>
<id>default-test</id>
<configuration>

<!--<argLine>XXadd-opens ch.qos.logback.core/ch.qos.logback.core.testUtil=java.naming</argLine>-->
<!--<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>-->
<!-- x-show-module-resolution -->
<argLine>
--show-module-resolution
--add-modules jakarta.mail
--add-modules jakarta.servlet
--add-opens ch.qos.logback.core/ch.qos.logback.core.testUtil=java.naming
--add-opens ch.qos.logback.classic/ch.qos.logback.classic.testUtil=ch.qos.logback.core
--add-reads ch.qos.logback.core=org.codehaus.janino.commons.compiler,org.codehaus.janino.janino
</argLine>
<parallel>classes</parallel>
<threadCount>8</threadCount>
Expand Down
15 changes: 13 additions & 2 deletions logback-classic/src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
module ch.qos.logback.classic {
requires org.slf4j;
module ch.qos.logback.classic {
// requires static means optional
requires static java.management;

// used by the optional ContextJNDISelector component
requires static java.naming;

// used by the optional LevelChangePropagator component
requires static java.logging;

// used by the optional ContextJNDISelector, MDCInsertingServletFilter among other components
requires static jakarta.servlet;

requires static jakarta.mail;

requires org.slf4j;

requires ch.qos.logback.core;
uses ch.qos.logback.classic.spi.Configurator;
provides org.slf4j.spi.SLF4JServiceProvider with ch.qos.logback.classic.spi.LogbackServiceProvider;
Expand Down
2 changes: 2 additions & 0 deletions logback-core-blackbox/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
</dependency>


<!--
<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
Expand All @@ -34,6 +35,7 @@
<artifactId>jakarta.mail-api</artifactId>
<scope>compile</scope>
</dependency>
-->

<dependency>
<groupId>org.codehaus.janino</groupId>
Expand Down
15 changes: 10 additions & 5 deletions logback-core/src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
module ch.qos.logback.core {
requires static transitive java.sql;
requires static transitive java.naming;
requires static transitive java.xml;
requires static transitive jakarta.mail;
requires static transitive java.xml;
requires static java.sql;

// jakarta.servlet 5.0 is not modular so it cannot be declared 'transitive'
// required by the optional SMTPAppenderBase component
requires static java.naming;

// transitive _imposes_ the presence of jakarta.mail on downstream users,
// let them declare it if they need it
requires static jakarta.mail;

// jakarta.servlet 5.0 is not modular
requires static jakarta.servlet;

requires static janino;
Expand Down

0 comments on commit 0c78913

Please sign in to comment.