@Mojo(name="sql", defaultPhase=PROCESS_CLASSES, requiresDependencyResolution=COMPILE) public class OpenJpaSqlMojo extends AbstractOpenJpaMappingToolMojo
Modifier and Type | Field and Description |
---|---|
protected boolean |
modifyDatabase
Use this option to write the planned schema modifications to
the database.
|
protected static String |
OPTION_SQL_ACTION
internally the options is named 'schemaAction'!
|
protected static String |
OPTION_SQL_FILE
used for passing the sqlFile parameter to the mapping tool
|
protected String |
sqlAction
The action to take for generating the SQL.
|
protected File |
sqlFile
Use this option to write the planned schema modifications to a SQL
script.
|
action, OPTION_ACTION
classes, compileClasspathElements, OPTION_CONNECTION_DRIVER_NAME, OPTION_CONNECTION_PROPERTIES, OPTION_PROPERTIES, OPTION_PROPERTIES_FILE, project, workDir
Constructor and Description |
---|
OpenJpaSqlMojo() |
Modifier and Type | Method and Description |
---|---|
protected Options |
getOptions()
Get the options for the various OpenJPA tools.
|
execute
createOptions, extendRealmClasspath, findEntityClassFiles, getClasspathElements, getEntityClasses, getFilePaths, skipMojo
@Parameter(defaultValue="build") protected String sqlAction
schemaAction
, but we have to
split it for the plugin to allow different actions for generating the mapping
and generating the SQL files.protected static final String OPTION_SQL_ACTION
@Parameter(defaultValue="${project.build.directory}/database.sql") protected File sqlFile
protected static final String OPTION_SQL_FILE
@Parameter(defaultValue="false") protected boolean modifyDatabase
protected Options getOptions() throws org.apache.maven.plugin.MojoExecutionException
AbstractOpenJpaMojo
getOptions
in class AbstractOpenJpaMojo
org.apache.maven.plugin.MojoExecutionException
Copyright © 2006–2017 Apache Software Foundation. All rights reserved.