As of this writing the OpenJPA Plugin provides a way to enhance persistence-enabled classes in a project using Maven 2.
OpenJPA PCEnhancer that is invoked by the OpenJPA Maven Plugin's Enhancer Mojo expects the following resources to be present on classpath:
OpenJPA documentation is available here.
From the command prompt/terminal window.
mvn openjpa:enhance
Below is a simple Mojo configuration example.
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>openjpa-maven-plugin</artifactId>
<configuration>
<!-- Pass properties to the Plugin here -->
<toolProperties>
<property>
<name>addDefaultConstructor</name>
<value>true</value>
</property>
<property>
<name>enforcePropertyRestrictions</name>
<value>true</value>
</property>
</toolProperties>
</configuration>
</plugin>