Package org.codehaus.mojo.cassandra
Class AbstractCqlExecMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.codehaus.mojo.cassandra.AbstractCassandraMojo
org.codehaus.mojo.cassandra.AbstractCqlExecMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
- Direct Known Subclasses:
AbstractCqlLoadMojo,CqlExecCassandraMojo
Abstract parent class for mojos that need to run CQL statements.
- Author:
- sparhomenko
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected StringCharset used when loading CQL files.protected booleanShould we use the CqlLexer when loading the cql file.Fields inherited from class org.codehaus.mojo.cassandra.AbstractCassandraMojo
addMainClasspath, addTestClasspath, cassandraDir, jmxPort, keyspace, listenAddress, logLevel, maxMemory, nativeTransportPort, project, rpcAddress, rpcPort, session, skip, startNativeTransport, stopKey, stopPort, storagePort, systemPropertyVariablesFields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected List<org.apache.cassandra.thrift.CqlResult> executeCql(String statements) protected StringsplitStatementsUsingCqlLexer(String statements) Best effort to somewhat parse the cql input instead of just splitting on ; which breaks badly if you have ; in strings or comments.Methods inherited from class org.codehaus.mojo.cassandra.AbstractCassandraMojo
createCassandraHome, createCassandraHome, createCassandraJar, createCassandraJar, createEnvironmentVars, getToolchain, newJavaCommandLine, newNodetoolCommandLine, newServiceCommandLine, newServiceCommandLine, useJdk11OptionsMethods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContextMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.maven.plugin.Mojo
execute
-
Field Details
-
cqlEncoding
Charset used when loading CQL files. If not specified the system default encoding will be used.- Since:
- 3.6
-
useCqlLexer
@Parameter(defaultValue="false") protected boolean useCqlLexerShould we use the CqlLexer when loading the cql file. This should be better than than the default behaviour which is to just split input on ; since it handles ; in comments and strings. It is not enabled by default since has not been extensively tested.- Since:
- 3.7
-
-
Constructor Details
-
AbstractCqlExecMojo
public AbstractCqlExecMojo()
-
-
Method Details
-
readFile
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
executeCql
protected List<org.apache.cassandra.thrift.CqlResult> executeCql(String statements) throws org.apache.maven.plugin.MojoExecutionException - Throws:
org.apache.maven.plugin.MojoExecutionException
-
splitStatementsUsingCqlLexer
Best effort to somewhat parse the cql input instead of just splitting on ; which breaks badly if you have ; in strings or comments. Parsing is done using the CqlLexer class
-