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, setPluginContextpublic SchemaMojo()
public void execute() throws MojoExecutionException, MojoFailureException
MojoExecutionExceptionMojoFailureExceptionMojo.execute()protected void initializeClasspathFromClassPathElements(Set<String> classpathFiles) throws MalformedURLException
classpathFiles - MalformedURLExceptionprotected void initializeClassLoaderWithJdbcDriver() throws MalformedURLException
jdbcDriverJarMalformedURLExceptionprotected List<String> getProvidedClasspathElements() throws ArtifactResolutionException, ArtifactNotFoundException
ArtifactNotFoundExceptionArtifactResolutionExceptionprotected Connection getConnection() throws Exception
Exceptionpublic void executeSql(Connection connection, String sqlPath) throws Exception
sqlPath.connection - the connection used to execute the SQL.sqlPath - the path to the SQL file.ExceptionCopyright © 2005–2014 AndroMDA.org. All rights reserved.