public class SchemaMojo extends AbstractMojo
Constructor and Description |
---|
SchemaMojo() |
Modifier and Type | Method and Description |
---|---|
void |
execute() |
void |
executeSql(Connection connection,
String sqlPath)
Executes the SQL contained with the file located at the
sqlPath . |
protected Connection |
getConnection()
Retrieves a database connection, given the appropriate database
information.
|
protected List<String> |
getProvidedClasspathElements()
Adds any dependencies with a scope of 'provided' to the current project
with a scope of runtime.
|
protected void |
initializeClassLoaderWithJdbcDriver()
Initializes the context class loader with the given
jdbcDriverJar |
protected void |
initializeClasspathFromClassPathElements(Set<String> classpathFiles)
Sets the current context class loader from the given runtime classpath
elements.
|
getLog, getPluginContext, setLog, setPluginContext
public SchemaMojo()
public void execute() throws MojoExecutionException, MojoFailureException
MojoExecutionException
MojoFailureException
Mojo.execute()
protected void initializeClasspathFromClassPathElements(Set<String> classpathFiles) throws MalformedURLException
classpathFiles
- MalformedURLException
protected void initializeClassLoaderWithJdbcDriver() throws MalformedURLException
jdbcDriverJar
MalformedURLException
protected List<String> getProvidedClasspathElements() throws ArtifactResolutionException, ArtifactNotFoundException
ArtifactNotFoundException
ArtifactResolutionException
protected Connection getConnection() throws Exception
Exception
public void executeSql(Connection connection, String sqlPath) throws Exception
sqlPath
.connection
- the connection used to execute the SQL.sqlPath
- the path to the SQL file.Exception
Copyright © 2005–2014 AndroMDA.org. All rights reserved.