Co-incidentally there was another thread on the same problem just a day or two
back.
Here's the mojo code:
https://svn.codehaus.org/mojo/tags/openjpa-maven-plugin-1.0-alpha/src/main/java/org/codehaus/mojo/openjpa/OpenJpaEnhancerMojo.java
for me, the reason I don't use it is that the 'classes' property of the mojo
only takes a single directory, and enhances all it can find in that dir.
I have 2 directories with different roots with entities in, and the root of both
has too many other classes with dependencies that aren't involved with JPA.
I could have modified the mojo locally for my own purposes but I found it was
easier to work out how to configure the maven-ant-run plugin than to build
myself a maven plugin. Marginally I guess but I haven't done that before.
Regards
Adam
Kevin Sutter on 12/02/09 14:05, wrote:
David,
I totally agree that enhancing the JPA POJOs is a desired operation. I was
referring to the maven plugin itself. Is this tool worthwhile to support?
It sounds like it could help the build time processing for OpenJPA
enhancement.
Kevin
On Thu, Feb 12, 2009 at 4:04 AM, David Goodenough <
[email protected]> wrote:
On Wednesday 11 February 2009, Kevin Sutter wrote:
Is this worth "enhancing" (pardon the pun)? Seriously, is this maven
plugin worth supporting? Or, possibly bringing into our svn?
Well yes there is a good reason to enhance.
If you are using BeanBindings (and I guess that the other Bean Binding
machanisms have the same problem) it gets very confused if there are two
versions of the same class around, the one that is bound and the one that
gets delivered with the data. The only way I found to get binding to work
correctly was to enhance the JPA POJOs.
This has been discussed on several occasions on this forum (I initiated one
of the threads, and I was then pointed at other threads).