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

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

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Done
    • None
    • 2016.8
    • None
    • 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

      Attachments

        Activity

          People

            Unassigned Unassigned
            marcohofstetter Marco Hofstetter (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: