Skip to content

[#11683] Install JUL-to-SLF4J bridge to route java.util.logging through Maven logging#12344

Merged
gnodet merged 2 commits into
apache:masterfrom
gnodet:fix-11683
Jun 27, 2026
Merged

[#11683] Install JUL-to-SLF4J bridge to route java.util.logging through Maven logging#12344
gnodet merged 2 commits into
apache:masterfrom
gnodet:fix-11683

Conversation

@gnodet

@gnodet gnodet commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds the jul-to-slf4j bridge dependency so that libraries using java.util.logging (JUL) have their log output routed through SLF4J and Maven's logging system, instead of writing directly to stderr.
  • Installs SLF4JBridgeHandler in LookupInvoker.activateLogging(), following the same pattern as the existing jcl-over-slf4j and slf4j-jdk-platform-logging bridges.

Fixes #11683

Changes

  • pom.xml: Added jul-to-slf4j to dependency management
  • apache-maven/pom.xml: Added jul-to-slf4j as runtime dependency in the distribution
  • impl/maven-cli/pom.xml: Added jul-to-slf4j compile dependency
  • LookupInvoker.java: Installed SLF4JBridgeHandler during logging activation

🤖 Generated with Claude Code

… through Maven logging

Adds the jul-to-slf4j bridge so that libraries using java.util.logging
(JUL) have their log output routed through SLF4J and Maven's logging
system, instead of writing directly to stderr.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gnodet gnodet added the bug Something isn't working label Jun 23, 2026
@gnodet gnodet added this to the 4.1.0 milestone Jun 23, 2026
@gnodet gnodet requested review from cstamas and mthmulders June 23, 2026 10:31
Avoid redundantly removing handlers and reinstalling the
SLF4JBridgeHandler on every activateLogging() call, which matters
in embedded/resident-mode scenarios where Maven is invoked multiple
times in the same JVM.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gnodet gnodet merged commit d260f0d into apache:master Jun 27, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Install JUL-to-SLF4J bridge to route java.util.logging through Maven logging

1 participant