It is often better to enhance your entities at build times and it generally simply needs to add -Aopenjpa.metamodel=true to maven compiler compilerArguments and openjpa to the classpath of the plugin but it has two main drawbacks:
- if you need to use other processors you can’t manage it correctly
- it simply doesn’t work with maven compiler plugin 3.0
Of course there is an interesting alternative.