org.apache.torque.mojo
Class IdentifyInvalidDataFiles
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.apache.torque.mojo.BaseMojo
org.apache.torque.mojo.IdentifyInvalidDataFiles
- All Implemented Interfaces:
- org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
public class IdentifyInvalidDataFiles
- extends BaseMojo
This mojo identifies data files that are present on the file system but are not present in schema.xml. This can
happen if a table is removed from the schema.
It sets a project property called "impex.data.invalid". This property is a comma delimited list of filenames that
have no match in the db schema.
If it finds any invalid files it will also set the project property "impex.found.invalid=true"
Fields inherited from interface org.apache.maven.plugin.Mojo |
ROLE |
Methods inherited from class org.apache.torque.mojo.BaseMojo |
afterExecution, beforeExecution, execute, getEncoding, getMavenSession, getProject, getSettings, isForceMojoExecution, isSkip, isStartMavenLogger, setEncoding, setForceMojoExecution, setMavenSession, setProject, setSettings, setSkip, setStartMavenLogger, skipMojo |
Methods inherited from class org.apache.maven.plugin.AbstractMojo |
getLog, getPluginContext, setLog, setPluginContext |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IdentifyInvalidDataFiles
public IdentifyInvalidDataFiles()
getExportedFiles
protected Set<File> getExportedFiles()
throws org.apache.maven.plugin.MojoExecutionException
- Throws:
org.apache.maven.plugin.MojoExecutionException
getExportedFiles
protected Set<File> getExportedFiles(List<String> tablenames)
getContents
protected List<String> getContents(File file)
throws org.apache.maven.plugin.MojoExecutionException
- Throws:
org.apache.maven.plugin.MojoExecutionException
executeMojo
protected void executeMojo()
throws org.apache.maven.plugin.MojoExecutionException,
org.apache.maven.plugin.MojoFailureException
- Specified by:
executeMojo
in class BaseMojo
- Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
createFile
protected void createFile(File file,
String contents)
throws IOException
- Throws:
IOException
getDatabaseFiles
protected Set<File> getDatabaseFiles(org.apache.torque.engine.database.model.Database db)
getExistingFiles
protected Set<File> getExistingFiles(org.apache.tools.ant.DirectoryScanner ds)
getDirectoryScanner
protected org.apache.tools.ant.DirectoryScanner getDirectoryScanner()
getFile
protected File getFile(org.apache.torque.engine.database.model.Table table)
getDataDir
public File getDataDir()
setDataDir
public void setDataDir(File dataDir)
getDataDirIncludes
public String getDataDirIncludes()
setDataDirIncludes
public void setDataDirIncludes(String dataDirIncludes)
getDataDirExcludes
public String getDataDirExcludes()
setDataDirExcludes
public void setDataDirExcludes(String dataDirExcludes)
getSchemaXMLFile
public String getSchemaXMLFile()
setSchemaXMLFile
public void setSchemaXMLFile(String schemaXMLFile)
getExtension
public String getExtension()
setExtension
public void setExtension(String extension)
getTargetDatabase
public String getTargetDatabase()
setTargetDatabase
public void setTargetDatabase(String targetDatabase)
getMarkedForRemoval
public File getMarkedForRemoval()
setMarkedForRemoval
public void setMarkedForRemoval(File markedForRemoval)
Copyright © 2004-2011 The Kuali Foundation. All Rights Reserved.