Skip to content

[MSHADE-417] Fix null bytes appended to small files by maven-shade-plugin #662

@jira-importer

Description

@jira-importer

Max Zerzouri opened MSHADE-417 and commented

Version 3.3.0 of maven shade plugin seems to append "\x00" bytes to a file if it's less than 4 bytes:

$ echo -n a > src/main/resources/test.txt
$ mvn clean install
...
$ bsdtar -xOf target/original-shadetest-0.0.0.jar test.txt | xxd
00000000: 61                                       a
$ bsdtar -xOf target/shadetest-0.0.0.jar test.txt | xxd
00000000: 6100 0000                                a...

I've attached a basic pom.xml that triggers this. This doesn't occur in the previous version, 3.2.4.


Affects: 3.3.0

Attachments:

Issue Links:

  • MSHADE-378 Shade plugin changes the compression level of nested jar entries
    ("is broken by")

Remote Links:

3 votes, 7 watchers

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingpriority:majorMajor loss of function

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions