Package com.theoryinpractise.clojure
Class ClojureRunTestWithJUnitMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- com.theoryinpractise.clojure.AbstractClojureCompilerMojo
-
- com.theoryinpractise.clojure.ClojureRunTestWithJUnitMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
- Direct Known Subclasses:
ClojureRunTestMojo
@Mojo(name="test-with-junit", defaultPhase=TEST, requiresDependencyResolution=TEST) public class ClojureRunTestWithJUnitMojo extends AbstractClojureCompilerMojo
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.theoryinpractise.clojure.AbstractClojureCompilerMojo
AbstractClojureCompilerMojo.SourceDirectory
-
-
Field Summary
Fields Modifier and Type Field Description private booleanskipFlag to allow test compiliation to be skipped.private booleanskipTestsFlag to allow test execution to be skipped.private java.lang.StringtestProvide a comma separated list of tests to run, instead of trying to run all of the test.private java.lang.StringtestOutputDirectoryOutput directory for test resultsprivate java.lang.StringtestScriptThe main clojure script to runprivate booleanxmlEscapeOutputWhether to XML escape non-report output sent to *out*-
Fields inherited from class com.theoryinpractise.clojure.AbstractClojureCompilerMojo
baseDirectory, baseTestSourceDirectory, charset, classpathElements, compileDeclaredNamespaceOnly, copiedNamespaces, copyDeclaredNamespaceOnly, directLinking, generatedSourceDirectory, namespaces, outputDirectory, project, sourceDirectories, testClasspathElements, testDeclaredNamespaceOnly, testNamespaces, testSourceDirectories, workingDirectory
-
-
Constructor Summary
Constructors Constructor Description ClojureRunTestWithJUnitMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecute()protected voidgenerateConfig(java.io.PrintWriter writer, NamespaceInFile[] ns)private voidgenerateTestScript(java.io.PrintWriter writer)protected java.util.PropertiesgetProps(NamespaceInFile[] ns)-
Methods inherited from class com.theoryinpractise.clojure.AbstractClojureCompilerMojo
callClojureWith, callClojureWith, callClojureWith, callClojureWith, copyNamespaceSourceFilesToOutput, createTemporaryDirectory, discoverNamespaces, discoverNamespacesToCopy, escapeFilePath, escapeFilePath, getDefaultJavaHomeExecutable, getRunWithClasspathElements, getSourceDirectories, getWorkingDirectory, isClasspathResource, isExistingTestScriptFile
-
-
-
-
Field Detail
-
skip
@Parameter(required=true, property="maven.test.skip", defaultValue="false") private boolean skipFlag to allow test compiliation to be skipped.
-
skipTests
@Parameter(required=true, property="skipTests", defaultValue="false") private boolean skipTestsFlag to allow test execution to be skipped.
-
testScript
@Parameter private java.lang.String testScript
The main clojure script to run
-
testOutputDirectory
@Parameter(defaultValue="${project.build.directory}/test-reports", property="clojure.testOutputDirectory") private java.lang.String testOutputDirectoryOutput directory for test results
-
xmlEscapeOutput
@Parameter(defaultValue="true", property="clojure.xmlEscapeOutput") private boolean xmlEscapeOutputWhether to XML escape non-report output sent to *out*
-
test
@Parameter(property="test") private java.lang.String test
Provide a comma separated list of tests to run, instead of trying to run all of the test.
-
-
Method Detail
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-
generateConfig
protected void generateConfig(java.io.PrintWriter writer, NamespaceInFile[] ns) throws java.io.IOException- Throws:
java.io.IOException
-
getProps
protected java.util.Properties getProps(NamespaceInFile[] ns)
-
generateTestScript
private void generateTestScript(java.io.PrintWriter writer) throws java.io.IOException- Throws:
java.io.IOException
-
-