Skip to content

[RUN-3345] Stop bundling a duplicate slf4j-api in the plugin lib - #157

Merged
ltamaster merged 1 commit into
mainfrom
RUN-3345-sshj-slf4j-warning
Aug 20, 2026
Merged

[RUN-3345] Stop bundling a duplicate slf4j-api in the plugin lib#157
ltamaster merged 1 commit into
mainfrom
RUN-3345-sshj-slf4j-warning

Conversation

@fdevans

@fdevans fdevans commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

What

sshj (and its transitive dependency asn-one) resolve org.slf4j:slf4j-api to 2.0.17. Because pluginLibs resolves transitively, that jar was getting copied into the plugin's bundled lib/ and added to its runtime classpath alongside Rundeck's own slf4j-api + log4j binding.

Rundeck's host log4j-slf4j-impl only implements the legacy 1.7.x-style binding (org.slf4j.impl.StaticLoggerBinder), not the SLF4J 2.x provider SPI. So when the plugin's bundled 2.x slf4j-api initializes, it finds no compatible provider and falls back to a NOP logger — printing the No SLF4J providers were found warning on every job execution.

This excludes the transitive slf4j-api from sshj/asn-one in pluginLibs, so the plugin no longer ships a second copy at all and just defers to whatever slf4j-api the host already has wired up correctly.

Customer impact

Fixes a cosmetic-but-persistent warning that's been reported against Rundeck 5.9 through 6.0 by multiple users on #70 — jobs succeed, but every execution prints an alarming-looking SLF4J error block in the output.

How to test

  1. ./gradlew clean build — confirmed passing locally.
  2. Inspect the built jar's lib/slf4j-api is no longer bundled (verified locally; previously slf4j-api-2.0.17.jar was present).
  3. Deploy to a Rundeck instance and run a job using the SSHJ node executor/file copier — the SLF4J(W): No SLF4J providers were found block should no longer appear in job output.

Fixes #70

This is tracked internally.

sshj (and its transitive dep asn-one) resolve org.slf4j:slf4j-api to
2.0.17, and since pluginLibs resolves transitively, that jar was
getting copied into the plugin's bundled lib/ and added to its
runtime classpath alongside Rundeck's own slf4j-api + log4j binding.

The host's log4j-slf4j-impl only implements the legacy 1.7.x-style
binding (org.slf4j.impl.StaticLoggerBinder), not the 2.x provider
SPI, so when the plugin's bundled 2.x slf4j-api initializes it finds
no compatible provider and falls back to a NOP logger, printing the
'No SLF4J providers were found' warning on every job execution.

Excluding the transitive slf4j-api from sshj/asn-one keeps the
plugin from shipping a second copy at all, so it defers to whatever
slf4j-api the host already has wired up correctly.

Fixes #70
@fdevans
fdevans requested review from a team and a lite review from Copilot August 19, 2026 16:06

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.


💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@fdevans fdevans changed the title Stop bundling a duplicate slf4j-api in the plugin lib [RUN-3345] Stop bundling a duplicate slf4j-api in the plugin lib Aug 19, 2026
@ltamaster
ltamaster merged commit e51457b into main Aug 20, 2026
3 checks passed
@ltamaster
ltamaster deleted the RUN-3345-sshj-slf4j-warning branch August 20, 2026 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RUN-3345: command succeeds, but rundeck outputs SLF4J error

3 participants