Uploaded image for project: 'camunda BPM'
  1. camunda BPM
  2. CAM-1573

Add shaded classes to source jar whenever maven-shade-plugin is used

      In some places maven-shade-plugin is used, e.g. here: https://github.com/camunda/camunda-bpm-platform-ee/blob/master/distro/ibmWs8/service/pom.xml

      But in the resulting source jar the shaded classes are not contained - so there is a mismatch between classes.jar and sources.jar.

      I think this should be changed. Not completly sure - but it should be doable by a shading configurationhttp://maven.apache.org/plugins/maven-shade-plugin/shade-mojo.html#createSourcesJar

      e.g.:

      <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-shade-plugin</artifactId>
      <configuration>
      <createSourcesJar>true</createSourcesJar>
      </configuration>
      </plugin>

        This is the controller panel for Smart Panels app

            [CAM-1573] Add shaded classes to source jar whenever maven-shade-plugin is used

            Bernd Ruecker created issue -
            Robert Gimbel made changes -
            Description Original: In some places maven-share-plugin is used, e.g. here: https://github.com/camunda/camunda-bpm-platform-ee/blob/master/distro/ibmWs8/service/pom.xml

            But in the resulting source jar the shaded classes are not contained - so there is a mismatch between classes.jar and sources.jar.

            I think this should be changed. Not completly sure - but it should be doable by a shading configurationhttp://maven.apache.org/plugins/maven-shade-plugin/shade-mojo.html#createSourcesJar

            e.g.:

                  <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-shade-plugin</artifactId>
                    <configuration>
                     <createSourcesJar>true</createSourcesJar>
                    </configuration>
                  </plugin>
            New: In some places maven-shade-plugin is used, e.g. here: https://github.com/camunda/camunda-bpm-platform-ee/blob/master/distro/ibmWs8/service/pom.xml

            But in the resulting source jar the shaded classes are not contained - so there is a mismatch between classes.jar and sources.jar.

            I think this should be changed. Not completly sure - but it should be doable by a shading configurationhttp://maven.apache.org/plugins/maven-shade-plugin/shade-mojo.html#createSourcesJar

            e.g.:

                  <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-shade-plugin</artifactId>
                    <configuration>
                     <createSourcesJar>true</createSourcesJar>
                    </configuration>
                  </plugin>
            Robert Gimbel made changes -
            Fix Version/s Original: 7.1.0 [ 12891 ]
            Robert Gimbel made changes -
            Rank New: Ranked higher
            Christian made changes -
            Assignee New: Christian [ lipphardt ]

            Christian added a comment -

            Hint:

            There is a bug in maven-shade plugin. It requires generated -sources.jar from current module, otherwise the current modules sources won't be included in the shaded sources jar.

            Correct usage as of maven shade version 2.2 and earlier

            <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <executions>
            <execution>
            <id>generate-sources-for-shade-plugin</id>
            <phase>package</phase>
            <goals>
            <goal>jar-no-fork</goal>
            </goals>
            </execution>
            </executions>
            </plugin>
            <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-shade-plugin</artifactId>
            <configuration>
            <createSourcesJar>true</createSourcesJar>
            </configuration>
            </plugin

            Christian added a comment - Hint: There is a bug in maven-shade plugin. It requires generated -sources.jar from current module, otherwise the current modules sources won't be included in the shaded sources jar. Correct usage as of maven shade version 2.2 and earlier <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-source-plugin</artifactId> <executions> <execution> <id>generate-sources-for-shade-plugin</id> <phase>package</phase> <goals> <goal>jar-no-fork</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId> <configuration> <createSourcesJar>true</createSourcesJar> </configuration> </plugin
            Christian made changes -
            Fix Version/s New: 7.1.0 [ 12891 ]
            Fix Version/s New: 7.0.5 [ 13005 ]
            Christian made changes -
            Resolution New: Fixed [ 1 ]
            Status Original: Open [ 1 ] New: Closed [ 6 ]
            Robert Gimbel made changes -
            Fix Version/s New: 7.1.0-alpha2 [ 13190 ]
            Daniel Meyer made changes -
            Component/s New: continuous integration [ 12058 ]
            Component/s Original: maintenance [ 11750 ]

              lipphardt Christian
              ruecker Bernd Ruecker
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: