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

"XMLResultAggregator was not found" error when instantiating TestNG's junitreport task


    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: 1.0-milestone-3
    • Fix Version/s: None


      I was trying to use TestNG's junitreport task to convert its test reports into JUnit style reports for use in another system. I am unable to instantiate the taskdef due to a classpath issue. I tried to use the standard mechanism I have used to invoke other Ant tasks but it failed because a symbol in the optional ant-junit.jar was not being loaded. I was trying something like this, but it wouldn't work:


      { testngCustom 'testng:testng:6.0.1' testngCustom 'ant-junit4:ant-junit4:1.8.2' testngCustom 'junit:junit:4.8.1' }


      { File jar -> println 'adding ' + jar.toURL() ant.getClass().classLoader.addURL( jar.toURL() ) }

      ant.taskdef( resource: 'testngtasks',
      classpath: configurations.testngCustom.asPath)

      { println 'testng = ' + configurations.testngCustom.asPath }

      Adding to the classloader was just an idea I had found during a Google search and it didn't seem to help. As a test, I dropped in the ant-junit.jar obtained from my Ant 1.8.2 distribution into the gradle/lib directory and the problem went away. I don't want to have custom Gradle install for my users so requiring that step is unacceptable. As a workaround, I've got Gradle invoking an Ant script that runs the task but I would really like to be able to remove that in the future.

      This post seems to indicate that things were working until milestone-1: http://gradle.1045684.n5.nabble.com/ANN-Gradle-1-0-milestone-1-released-td3402072.html


        There are no comments yet on this issue.


          • Assignee:
            kurron Ronald Kurr
          • Votes:
            0 Vote for this issue
            0 Start watching this issue


            • Created: