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

shadedPattern applied multiples times when relocating the contents of META-INF/services files

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.1.1, 3.2.0, 3.2.1
    • 3.2.2

    Description

      Steps to reproduce:

      1. Modified the test case for https://issues.apache.org/jira/browse/MSHADE-190, as follows:

      diff --git a/pom.xml b/pom.xml
      index 746b700..aea9abb 100644
      --- a/pom.xml
      +++ b/pom.xml
      @@ -68,12 +68,12 @@
                   <plugin>
                       <groupId>org.apache.maven.plugins</groupId>
                       <artifactId>maven-shade-plugin</artifactId>
      -                <version>2.4</version>
      +                <version>3.1.1</version>
                       <configuration>
                           <relocations>
                               <relocation>
      -                            <pattern>org.eclipse.*</pattern>
      -                            <shadedPattern>borg.eclipse.*</shadedPattern>
      +                            <pattern>org.eclipse</pattern>
      +                            <shadedPattern>org.eclipse1234</shadedPattern>
                               </relocation>
                           </relocations>
                           <transformers>
      

      2. mvn package
      3. jar -xvf target/shade-meta-tc-1.0-SNAPSHOT.jar META-INF/services
      4. cat META-INF/services/org.osgi.framework.launch.FrameworkFactory

      The shaded service implementation class looks as follows:

      org.eclipse12341234.osgi.launch.EquinoxFactory
      

      It appears that shadedPattern was applied twice.

      Attachments

        Issue Links

          Activity

            People

              rfscholte Robert Scholte
              janlu Jan Luehe
              Votes:
              1 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: