apache / apache/maven-shade-plugin

AppendingTransformer generates undesired empty lines that cause errors

Open
#798 5 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
188
Forks
103
Avg merge
16h 39m
Merged PRs (30d)
4

Description

### Affected version

3.6.2

### Bug description

I'm transforming the files META-INF/maven/org.apache.maven.api.di.Inject using the AppendingTransformer.
After each merged file, it adds an empty line. From what I see in the code, it blindly adds a line feed after appending each file's contents, so it generates an empty line for each line ending with a line feed. Unfortunately, maven-di tries to load empty entries, resulting in exceptions. This makes it unusable in my use case, and I don't have a workaround.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the AppendingTransformer implementation and reproduce the merge using META-INF/maven/org.apache.maven.api.di.Inject. Check how line endings are handled between merged files; done means the output contains no undesired empty entries and maven-di no longer fails while loading it.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.