|Using Dali annotation processor from a maven build [message #718450]
||Wed, 24 August 2011 11:30
Registered: August 2011
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
Can anyone help out with this information?
Powered by FUDForum
. Page generated in 0.01850 seconds