Class ClojureRunMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
com.theoryinpractise.clojure.AbstractClojureCompilerMojo
com.theoryinpractise.clojure.ClojureRunMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
@Mojo(name="run",
requiresDependencyResolution=COMPILE_PLUS_RUNTIME)
public class ClojureRunMojo
extends AbstractClojureCompilerMojo
-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractClojureCompilerMojo
AbstractClojureCompilerMojo.SourceDirectory -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Stringargs specified on the command line.private StringThe fully qualified name of the main class to run.private StringThe main clojure script to runprivate String[]Additional scripts to runFields inherited from class AbstractClojureCompilerMojo
baseDirectory, baseTestSourceDirectory, charset, classpathElements, compileDeclaredNamespaceOnly, copiedNamespaces, copyDeclaredNamespaceOnly, directLinking, generatedSourceDirectory, namespaces, outputDirectory, project, sourceDirectories, testClasspathElements, testDeclaredNamespaceOnly, testNamespaces, testOutputDirectory, testSourceDirectories, workingDirectoryFields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute()private static StringmergeScripts(String script, String[] scripts) Returns either a path to a temp file that loads all of the provided scripts, or simply returns the singularscriptString (which therefore allows for @ classpath-loading paths to be passed in as a script).Methods inherited from class AbstractClojureCompilerMojo
callClojureWith, callClojureWith, callClojureWith, callClojureWith, copyNamespaceSourceFilesToOutput, createTemporaryDirectory, discoverNamespaces, discoverNamespacesToCopy, escapeFilePath, escapeFilePath, getDefaultJavaHomeExecutable, getRunWithClasspathElements, getSourceDirectories, getWorkingDirectory, isClasspathResource, isExistingTestScriptFileMethods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Field Details
-
script
The main clojure script to run -
scripts
Additional scripts to run -
mainClass
The fully qualified name of the main class to run. This main class is intended to be one generated by :gen-class, although any Java class with a standard main() function will do. -
args
args specified on the command line.
-
-
Constructor Details
-
ClojureRunMojo
public ClojureRunMojo()
-
-
Method Details
-
mergeScripts
private static String mergeScripts(String script, String[] scripts) throws org.apache.maven.plugin.MojoExecutionException Returns either a path to a temp file that loads all of the provided scripts, or simply returns the singularscriptString (which therefore allows for @ classpath-loading paths to be passed in as a script). If multiple scripts are defined, they must all exist; otherwise an exception is thrown.- Throws:
org.apache.maven.plugin.MojoExecutionException
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-