Skip to content

Duplicate file in the shade jar #712

Open

Description

@jiaminglu

Bug Report

1. Describe the bug

There are duplicate files in the shade jar. If I unzip the tikv-client-java-3.3.0-SNAPSHOT.jar, there will be a promt:
replace META-INF/LICENSE? [y]es, [n]o, [A]ll, [N]one, [r]ename:.

I am tring to include tikv java client in my project's jar package, and in the gradle task, I cannot exclude the duplicated file, and after some debugging, I found out the duplicate file is in the jar itself. The Jar task of gradle will expand the jar archive before processing, and there is an error

2. Minimal reproduce step (Required)

  1. Package the shade jar
  2. Unzip it to some empty directory

3. What did you see instead (Required)

replace META-INF/LICENSE? [y]es, [n]o, [A]ll, [N]one, [r]ename:.

4. What did you expect to see? (Required)

Unzip success.

5. What are your Java Client and TiKV versions? (Required)

Latest master branch.
The version of TiKV is inrelevant because this is a bug of the packaging process.

Activity

  1. changed the title [-]Duplicate file in the[/-] [+]Duplicate file in the shade jar[/+] on Jan 12, 2023
  2. jiaminglu commented on Jan 12, 2023

    @jiaminglu
    ContributorAuthor

    There is a LICENSE file and a license directory. I believe this is caused by the case insensitivity of mac file system, and the shade plugin compare file names case sensitively

  3. added 3 commits that reference this issue on Jan 12, 2023
    dbce18c
    57f3d4d
    873facc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions