Uploaded image for project: 'Gradle'
  1. Gradle
  2. GRADLE-1361

Fat jar cookbook example leads to error

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: 0.9.2
    • Fix Version/s: 1.0-milestone-4

      Description

      I have a multiproject build and I put a fat jar task in one of the subprojects. I created the fat jar task similar to the one described in the cookbook - http://docs.codehaus.org/display/GRADLE/Cookbook#Cookbook-Creatingafatjar

      jar {
      from configurations.compile.collect

      { it.isDirectory() ? it : zipTree(it) }

      manifest

      { attributes 'Main-Class': 'com.benmccann.gradle.test.WebServer' }

      }

      Running it results in the following error:
      Cause: You can't change a configuration which is not in unresolved state!

      I'm not sure what this error means. It seems that this is a bug or the documentation should be updated.

        Attachments

          Activity

            People

            Assignee:
            szczepiq Szczepan Faber
            Reporter:
            chengas123 Ben McCann
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: