Gradle

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What’s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
To raise new issues or bugs against Gradle, please use forums.gradle.org.
  • Gradle
  • GRADLE-1582

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

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

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

Description

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:

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

configurations.testngCustom.each { 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

Activity

  • All
  • Comments
  • History
  • Activity
  • TeamCity
  • Commits
  • Source
  • Reviews
No commits found.

People

  • Assignee:
    Unassigned
    Reporter:
    Ronald Kurr
Vote (0)
Watch (0)

Dates

  • Created:
    01/Jun/11 8:44 AM
    Updated:
    01/Jun/11 8:44 AM
  • Atlassian JIRA (v5.0.3#729-sha1:bf569e4)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Gradle. Try JIRA - bug tracking software for your team.