Bug 356036 - Provide mechanism to invoke Dali metamodel generation externally from Eclipse or provide overwrite capability
Summary: Provide mechanism to invoke Dali metamodel generation externally from Eclipse...
Status: NEW
Alias: None
Product: Dali JPA Tools
Classification: WebTools
Component: General (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Neil Hauge CLA
QA Contact:
URL: http://www.eclipse.org/forums/index.p...
Whiteboard:
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2011-08-28 21:41 EDT by apfryer CLA
Modified: 2013-09-11 10:16 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description apfryer CLA 2011-08-28 21:41:57 EDT
Build Identifier: 20110615-0604

I am currently using maven and eclipse and have a JPA project as one of the maven modules. I can build everything fine and have the JPA project configured to automatically generate the metamodel classes in a specified directory. The maven build of the project also builds the metamodel classes into the same folder but uses a different annotation processor (openjpa or eclipselink).

In the generated classes, this is always a @Generated annotation, which for eclipselink looks like this...

@Generated("EclipseLink - Wed Aug 24 21:20:08 EST 2011")

The problem I have is that when the @Generated annotation value isn't "Dali", then when I make changes to entity classes in eclipse, the metamodel classes won't be automatically updated/overwritten. If i manually change the @Generated value to "Dali", it all starts working again. This is probably the expected behaviour but gives me a problem so that when I do a maven build, i lose the capability to have my metamodel classes automatically updated. I have to manually delete the metamodel classes and allow Dali to regenerate them.

I was thinking that a solution to this problem would be to invoke the Dali annotation processor from the maven build, instead of eclipselink or openjpa. That way, hopefully the @Generated value would be "Dali" and then Dali would continue to overwrite the metamodel classes as changes to the entity classes were made.

I'm assuming it would be possible to do this if I had
a) a maven dependency that contained the Dali annotation processor class
b) the compiler options required to pass to the Dali annotation processor

I believe there is currently no Dali annotation processor that can be accessed externally and it was suggested by Neil Hauge that I create an enhancement request to have one created.


Reproducible: Always
Comment 1 Neil Hauge CLA 2011-10-03 17:58:59 EDT
3.2 is now our Juno release...moving this to the Juno target.
Comment 2 Neil Hauge CLA 2012-04-11 11:15:02 EDT
We ran out of time for this in 3.2.  Also, as mentioned on the forum and for clarification in the bug, Dali does not use an annotation processor to generate the metamodel, which makes this a more challenging proposition.