Uploaded image for project: 'Maven Shade Plugin'
  1. Maven Shade Plugin
  2. MSHADE-167

[PATCH] When individual classes are renamed, they are not debuggable

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.2
    • 2.3
    • None

    Description

      One can rename a given class using, e.g.:

      <relocation>
        <pattern>com.example.foo.</pattern>
        <shadedPattern>com.uber._foo.__</shadedPattern>
      </relocation>
      

      Using the above relocation, com.example.foo.Bar will be relocated to com.uber._foo.__Bar and this is fine. If the source jar is generated, the .java file will be moved accordingly. The proposed patch changes the source information in the relocated class to use the new basename of the Java source file, making it possible to debug again. My Apache ICLA is on file, rights are granted, and a test of the functionality is included.

      Attachments

        1. shade-srcfile.patch.txt
          5 kB
          Matthew Jason Benson

        Activity

          People

            jdcasey John Dennis Casey
            mbenson Matthew Jason Benson
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: