I've been using Avaje.org ebean ORM layer for a while, but I don't understand how to enable the byte-code enhancement functionality described in the "Ebean v2.6.0 User Guide" with Maven.
I found a configuration example on the Avaje.org homepage, but it doesn't work. Neither does the demo Maven boilerplate on GitHub.
Help!
EBeans now has its own Maven Plugin, but I can't find any documentation online, so here is an example of how to use it:
With Eclipse
If you use Eclipse, you will want to make sure it runs the plugin when needed, like this:
OBSOLETE ANSWER
This answer is for a very old version of EBeans, please disregard it.
Original Content
The example on the Avaje page has some mistakes.
The complete config should be:
This will enhance all of the @Entity classes in the "src/main/java/com/mycompany" and below.
You can improve execution time by being more restrictive on the packages to examine.
Also, you may need to duplicate this config if you do need to enhance test classes. In that case, use the 'proces-test-classes' phase for a second block.
JBCP's answer is for old ebean version (
org.avaje.ebeanorm
). For newer version (io.ebean
) you need to change toebean-maven-plugin
.Note: ebean plugin version should be the same as ebean version.
Reference: Maven Repo, Github