[GRADLE-1375] compileJava done before Datanucleus has enhanced classes Created: 06/Feb/11 Updated: 10/Feb/17 Resolved: 10/Feb/17
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:
|Comment by Ashton Hepburn [ 01/Apr/11 ]|
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?
|Comment by James Wilson [ 04/Aug/11 ]|
I worked around this problem by using the datanucleus ant task. Below is how I updated build.gradle from the attached example.zip. With these changes, the test passes.
|Comment by Jarosław Skrzypek [ 08/Apr/12 ]|
Quote from http://www.datanucleus.org/products/datanucleus/enhancer.html#javac on running enhancer via annotations:
It looks like this is a limitation of running datanucleus enhancer via annotations rather than a gradle bug.
|Comment by Benjamin Muschko [ 15/Nov/16 ]|
As announced on the Gradle blog we are planning to completely migrate issues from JIRA to GitHub.
We intend to prioritize issues that are actionable and impactful while working more closely with the community. Many of our JIRA issues are inactionable or irrelevant. We would like to request your help to ensure we can appropriately prioritize JIRA issues you’ve contributed to.
Please confirm that you still advocate for your JIRA issue before December 10th, 2016 by:
We look forward to collaborating with you more closely on GitHub. Thank you for your contribution to Gradle!
|Comment by Benjamin Muschko [ 10/Feb/17 ]|
Thanks again for reporting this issue. We haven't heard back from you after our inquiry from November 15th. We are closing this issue now. Please create an issue on GitHub if you still feel passionate about getting it resolved.