Uploaded image for project: 'Thorntail'
  1. Thorntail
  2. THORN-580

Swarm Uber-jar does not work with gradle and a source-jar-task

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 2016.8
    • Component/s: None
    • Labels:
      None

      Description

      When I add a source-jar with an extra task to my gradle-project (without war-plugin applied), the swarm gradle-plugin wraps the source-jar instead of the "classes"-jar into the swarm uber-jar (<swarm-uber-jar>/_bootstrap/<sources>.jar). This way running the uber-jar fails.

      I apply the source-jar the following way:

      task sourcesJar(type: Jar, dependsOn: classes) { classifier = 'sources' from sourceSets.main.allSource }
      
      artifacts { archives sourcesJar }
      

      I think it's because of the logic in the gradle-plugin "PackagePlugin" which just chooses the latest added task of the type "Jar".

      My PR: https://github.com/wildfly-swarm/wildfly-swarm/pull/59

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                mhofi Marco Hofstetter
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: