Details
-
Type:
Bug
-
Status:
Open
-
Resolution: Unresolved
-
Affects Version/s: 0.9.2
-
Fix Version/s: None
Description
When building a project that uses Datanucleus for persistence, classes are enhanced during 'compileJava'. compileJava returns too fast with status completed, before the enhancement of classes is complete.
Subsequent tasks, such as jar, will therefore use the non-enhanced classes.
See http://gradle.1045684.n5.nabble.com/compileJava-done-before-Datanucleus-has-enhanced-classes-tc3372540.html for the original thread in the Gradle users mailing list.
I've provided a test:
- Run 'gradle clean test' > test fails, takes a while before you return to the command line
- Then run 'gradle test -x compileJava' > test succeeds
We're experiencing the same issue, running with: Gradle 1.0-milestone-1
That said both of the gradle commands listed above work for us. I could submit a test project (if useful), but it isn't substantively different.
As mentioned in the forum thread – I'm not seeing enhanced classes ending up in the .jar, this is easily verified by using javap to inspect them.
Is there a easy workaround?