public abstract class AbstractClojureCompilerMojo
extends org.apache.maven.plugin.AbstractMojo
Modifier and Type | Class and Description |
---|---|
static class |
AbstractClojureCompilerMojo.SourceDirectory |
Modifier and Type | Field and Description |
---|---|
protected File |
baseDirectory |
protected File |
baseTestSourceDirectory
Location of the source files.
|
protected String |
charset
Source file encoding
|
protected List<String> |
classpathElements |
protected boolean |
compileDeclaredNamespaceOnly
Should we compile all namespaces or only those defined?
|
protected String[] |
copiedNamespaces
A list of namespaces whose source files will be copied to the output.
|
protected boolean |
copyDeclaredNamespaceOnly
Should we copy the source of all namespaces or only those defined?
|
protected Boolean |
directLinking
A list of namespaces to compile
clojure.compiler.direct-linking
|
protected File |
generatedSourceDirectory
Location of the generated source files.
|
protected String[] |
namespaces
A list of namespaces to compile
|
protected File |
outputDirectory |
protected org.apache.maven.project.MavenProject |
project |
protected String[] |
sourceDirectories
Location of the source files.
|
protected List<String> |
testClasspathElements |
protected boolean |
testDeclaredNamespaceOnly
Should we test all namespaces or only those defined?
|
protected String[] |
testNamespaces
A list of test namespaces to compile
|
protected File |
testOutputDirectory |
protected String[] |
testSourceDirectories
Location of the source files.
|
protected File |
workingDirectory
Working directory for forked java clojure process.
|
Constructor and Description |
---|
AbstractClojureCompilerMojo() |
Modifier and Type | Method and Description |
---|---|
protected void |
callClojureWith(ExecutionMode executionMode,
File[] sourceDirectory,
File outputDirectory,
List<String> compileClasspathElements,
String mainClass,
NamespaceInFile[] namespaceArgs) |
protected void |
callClojureWith(ExecutionMode executionMode,
File[] sourceDirectory,
File outputDirectory,
List<String> compileClasspathElements,
String mainClass,
String[] clojureArgs) |
protected void |
callClojureWith(File[] sourceDirectory,
File outputDirectory,
List<String> compileClasspathElements,
String mainClass,
NamespaceInFile[] namespaceArgs) |
protected void |
callClojureWith(File[] sourceDirectory,
File outputDirectory,
List<String> compileClasspathElements,
String mainClass,
String[] clojureArgs) |
protected void |
copyNamespaceSourceFilesToOutput(File outputDirectory,
NamespaceInFile[] discoveredNamespaces) |
protected File |
createTemporaryDirectory(String name) |
protected NamespaceInFile[] |
discoverNamespaces() |
protected NamespaceInFile[] |
discoverNamespacesToCopy() |
protected String |
escapeFilePath(File file)
Escapes the given file path so that it's safe for inclusion in a
Clojure string literal.
|
protected String |
escapeFilePath(String directory,
String file)
Escapes the given file path so that it's safe for inclusion in a
Clojure string literal.
|
List<String> |
getRunWithClasspathElements() |
File[] |
getSourceDirectories(AbstractClojureCompilerMojo.SourceDirectory... sourceDirectoryTypes) |
protected File |
getWorkingDirectory() |
protected boolean |
isClasspathResource(String path) |
protected boolean |
isExistingTestScriptFile(String path) |
getLog, getPluginContext, setLog, setPluginContext
@Parameter(required=true, readonly=true, property="project") protected org.apache.maven.project.MavenProject project
@Parameter(required=true, readonly=true, property="basedir") protected File baseDirectory
@Parameter(required=true, readonly=true, property="project.compileClasspathElements") protected List<String> classpathElements
@Parameter(required=true, readonly=true, property="project.testClasspathElements") protected List<String> testClasspathElements
@Parameter(required=true, defaultValue="${project.build.outputDirectory}") protected File outputDirectory
@Parameter(required=true, defaultValue="${project.build.testOutputDirectory}") protected File testOutputDirectory
@Parameter protected String[] sourceDirectories
@Parameter protected String[] testSourceDirectories
@Parameter(required=true, defaultValue="${project.build.testSourceDirectory}") protected File baseTestSourceDirectory
@Parameter(required=true, defaultValue="${project.build.outputDirectory}/../generated-sources") protected File generatedSourceDirectory
@Parameter protected File workingDirectory
@Parameter(defaultValue="false") protected boolean compileDeclaredNamespaceOnly
@Parameter protected String[] namespaces
@Parameter(required=true, defaultValue="false") protected Boolean directLinking
@Parameter(defaultValue="false") protected boolean testDeclaredNamespaceOnly
@Parameter protected String[] testNamespaces
@Parameter protected String[] copiedNamespaces
@Parameter(defaultValue="false") protected boolean copyDeclaredNamespaceOnly
@Parameter(defaultValue="${project.build.sourceEncoding}") protected String charset
protected String escapeFilePath(String directory, String file)
directory
- directory pathfile
- file nameprotected String escapeFilePath(File file)
file
- The file whose path we want to escapeprotected File getWorkingDirectory() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
protected File createTemporaryDirectory(String name) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
protected NamespaceInFile[] discoverNamespaces() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
protected NamespaceInFile[] discoverNamespacesToCopy() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
public File[] getSourceDirectories(AbstractClojureCompilerMojo.SourceDirectory... sourceDirectoryTypes)
protected void copyNamespaceSourceFilesToOutput(File outputDirectory, NamespaceInFile[] discoveredNamespaces) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
protected void callClojureWith(File[] sourceDirectory, File outputDirectory, List<String> compileClasspathElements, String mainClass, NamespaceInFile[] namespaceArgs) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
protected void callClojureWith(File[] sourceDirectory, File outputDirectory, List<String> compileClasspathElements, String mainClass, String[] clojureArgs) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
protected void callClojureWith(ExecutionMode executionMode, File[] sourceDirectory, File outputDirectory, List<String> compileClasspathElements, String mainClass, NamespaceInFile[] namespaceArgs) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
protected void callClojureWith(ExecutionMode executionMode, File[] sourceDirectory, File outputDirectory, List<String> compileClasspathElements, String mainClass, String[] clojureArgs) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
protected boolean isExistingTestScriptFile(String path)
protected boolean isClasspathResource(String path)
Copyright © 2018. All rights reserved.