Hi all,

I just wrote a small JUnit 5 extension which executes the enhancement "in
place" (as our maven plugin).
Rational was to have right-click -> run feature of intellij working without
having to setup openjpa:enhance.
Indeed it has some limitation (like the class must not be scanned/loaded
before it is executed) but it solves my dev workflow issue so I thought I
would send it there and see if it can be interesting to contribute it (or
not ;)).

Here is the extension:

https://gist.github.com/rmannibucau/3aeb87aa76ab8bbceae1b5bac4aa0b9a

Its usage is pretty simple - even if it requires some explicit listing of
classes, it can be shared through a junit5 stereotype/meta-annotation - and
we can add scanning of file:// urls too if needed:

@OpenJPASupport(entities = {
        "org.superbiz.BaseEntity",
        "org.superbiz.MyEntity"
})
class MyJpaTest {}


Let me know if some of you are interested in getting it on openjpa master,
I would be happy to add it - and if you think it does not belong there it
is fine too ;).

Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
<https://www.packtpub.com/application-development/java-ee-8-high-performance>

Reply via email to