[GRADLE-2223] 1.0-rc1 breaks GWT unit test framework Created: 11/Apr/12  Updated: 04/Jan/13  Resolved: 18/Apr/12

Status: Resolved
Project: Gradle
Affects Version/s: 1.0-rc-1
Fix Version/s: 1.0-rc-2

Type: Bug
Reporter: Bryan Assignee: Unassigned
Resolution: Fixed Votes: 0

Attachments: Text File stack.txt    


The RC1 release of gradle, with its change to the test classpath, has broken the GWT unit test framework. Deep inside the GWT framework, it uses the URLClassloader when searching for resources and classes for testing. In the RC1 release notes, it suggests to check the classpath in the manifest of the jar it generates, but this cannot be easily done without rewriting large parts of the GWT test framework. I imaging this change could cause various problems in other frameworks as well, as it is a bit non-standard.

Perhaps an alternative to the current jar manifest approach would be to copy the jars to a directory, and then use a wildcard for the classpath (e.g. java -cp mydir/*)? This would only work with JDK 1.6 however. How does Ant handle this problem?

Comment by Adam Murdoch [ 11/Apr/12 ]

Do you have a stack trace for the test failures?

Comment by Bryan [ 11/Apr/12 ]

I've attached one of the stack traces. Basically a class isn't found which eventually leads to an NPE.

Comment by Bryan Keller [ 12/Apr/12 ]

Perhaps this new behavior could be made optional, so non-Windows platforms that don't have the command line length limit won't be affected

Comment by Adam Murdoch [ 18/Apr/12 ]

Could you try out the fix, and let us know how you go: http://gradle.org/release-candidate

Comment by Bryan Keller [ 19/Apr/12 ]

The fix works. I tried out the RC2 nightly and my GWT tests are running again.

Generated at Wed Jun 30 12:16:05 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.