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

maven2Gradle generates 'sourceSets.test.classes' instead of 'sourceSets.test.output'

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: 1.2
    • Fix Version/s: 1.3-rc-1

      Description

      I have found that this script block

      task packageTests(type: Jar)

      { from sourceSets.test.classes classifier = 'tests' }

      artifacts.archives packageTests

      provokes the following error when invoking a gradle task

      C:\devpacks\dpjw\maven-prj\dpjwApp>gradle dpjw-core:clean

      FAILURE: Build failed with an exception.

      • Where:
        Build file 'C:\devpacks\dpjw\maven-prj\dpjw-core\build.gradle' line: 27
      • What went wrong:
        A problem occurred evaluating project ':dpjw-core'.
        > Cannot get the value of write-only property 'classes' on source set test.
      • Try:
        Run with --stacktrace option to get the stack trace. Run with --info or --debug
        option to get more log output.

      BUILD FAILED

      Commenting it out, the generated build script works fine .

      (there is a warning about a "provided : true" on a property in a dependency compile block, which obviously should be "provided=true")

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            forums Gradle Forums
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: