Details
-
Type:
Bug
-
Status:
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
| Field | Original Value | New Value |
|---|---|---|
| Workflow | jira [ 13004 ] | jira with pivotal tracker [ 14162 ] |
| Workflow | jira with pivotal tracker [ 14162 ] | jira with pivotal tracker (no resolved, only closed) [ 17715 ] |
| Workflow | jira with pivotal tracker (no resolved, only closed) [ 17715 ] | Copy of jira with pivotal tracker (no closed, only resolved) [ 20345 ] |