public abstract class AbstractDataNucleusMojo
extends org.apache.maven.plugin.AbstractMojo
| Modifier and Type | Field and Description |
|---|---|
protected String |
api |
protected boolean |
fork |
protected boolean |
ignoreMetaDataForMissingClasses |
protected String |
jdkLogConfiguration |
protected String |
log4jConfiguration |
protected File |
metadataDirectory |
protected String |
metadataExcludes |
protected String |
metadataIncludes |
protected String |
persistenceUnitName |
protected List |
pluginArtifacts |
protected boolean |
verbose |
| Constructor and Description |
|---|
AbstractDataNucleusMojo() |
| Modifier and Type | Method and Description |
|---|---|
void |
execute()
Method to execute a goal.
|
protected void |
executeCommandLine(org.codehaus.plexus.util.cli.Commandline cl)
Method to execute a command line.
|
protected abstract void |
executeDataNucleusTool(List pluginArtifacts,
List files)
Template method expected to be implemented by extensions.
|
protected void |
executeInJvm(String className,
List args,
List cpEntries,
boolean quiet) |
protected List |
findMetadataFiles()
Locates and builds a list of all metadata files under the build output directory.
|
protected URL |
getJdkLogConfiguration()
Accessor for the JDK1.4 logging configuration URL.
|
protected URL |
getLog4JConfiguration()
Accessor for the Log4J configuration URL.
|
protected abstract String |
getToolName()
Returns the DataNucleus tool name being invoked by this plugin's execution.
|
protected List |
getUniqueClasspathElements()
Return the set of classpath elements, ensuring that
metadataDirectory
location is first, and that no entry is duplicated in the classpath. |
protected File metadataDirectory
protected String metadataIncludes
protected String metadataExcludes
protected boolean ignoreMetaDataForMissingClasses
protected List pluginArtifacts
protected String log4jConfiguration
protected String jdkLogConfiguration
protected boolean verbose
protected boolean fork
protected String persistenceUnitName
protected String api
public void execute()
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException - If an error occurs in executionprotected URL getLog4JConfiguration()
protected URL getJdkLogConfiguration()
protected List findMetadataFiles() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionprotected List getUniqueClasspathElements()
Return the set of classpath elements, ensuring that metadataDirectory
location is first, and that no entry is duplicated in the classpath.
The ability of the user to specify an alternate metadataDirectory location
facilitates the need for this.
Example: Users that want to DataNucleusEnhance their test classes.
protected abstract void executeDataNucleusTool(List pluginArtifacts, List files) throws org.codehaus.plexus.util.cli.CommandLineException, org.apache.maven.plugin.MojoExecutionException
pluginArtifacts - The artifactsfiles - The filesorg.codehaus.plexus.util.cli.CommandLineExceptionorg.apache.maven.plugin.MojoExecutionExceptionprotected abstract String getToolName()
protected void executeCommandLine(org.codehaus.plexus.util.cli.Commandline cl)
throws org.codehaus.plexus.util.cli.CommandLineException,
org.apache.maven.plugin.MojoExecutionException
cl - CommandLineorg.codehaus.plexus.util.cli.CommandLineException - Thrown if an error occurs invoking the command lineorg.apache.maven.plugin.MojoExecutionException - Thrown if the command line executes but with error return codeCopyright © 2019. All rights reserved.