GradleUp / GradleUp/shadow

Move "log4j shadow" to a separate plugin

Open
#2,060 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Kotlin
Stars
4.2k
Forks
425
Avg merge
3h 52m
Merged PRs (30d)
88

Description

What feature do you want to see added?

I would like to avoid default shadow-plugin -> log4j-core dependency as it causes CVEs indentified in log4j-core.

Here's an example:

Transitive dependency org.apache.logging.log4j:log4j-core 2.25.3 is introduced via
com.gradleup.shadow:shadow-gradle-plugin 9.4.2  org.apache.logging.log4j:log4j-core 2.25.3

By default, shadow should detect precense of multiple log4j configurations on the classpath and just fail with clear message like "to merge log4j configurations, use the following plugin" or something like that.

Note: in the ideal world, log4j should be designed in such a way that does not require special merger.

The hard dependency on log4j-core is painful for the end-users.

The issue impacts https://github.com/pgjdbc/pgjdbc

Upstream changes

No response

Are you interested in contributing this feature?

I would be willing to contribute the feature if that could be accepted

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the shadow Gradle plugin's log4j-core dependency and the code that merges log4j configurations. Review how plugin dependencies and configuration detection are tested. Done means the default plugin no longer carries log4j-core, while projects needing the merger can use a separate plugin and receive a clear failure message when multiple configurations are detected.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, kotlin
Domain
build-system
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.