The following build configuration shows how to use the OpenJPA MappingTool for generating the schema mapping XML file. Please consult the OpenJPA documentation for more details on the schema mapping XML syntax and usage.
The openjpa:schema mojo will typically be called manually, so there is no executions section.
<project> [...] <build> [...] <plugins> <plugin> <groupId>org.apache.openjpa</groupId> <artifactId>openjpa-maven-plugin</artifactId> <version>1.2</version> <schemaAction></schemaAction> <schemaFile>target/myschema.xml</schemaFile> </plugin> [...] </plugins> [...] </build> [...] </project>
Possible values for schemaAction are: add, refresh, drop, buildSchema, import, export, validate