Package de.saumya.mojo.tests
Class AbstractTestMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- de.saumya.mojo.jruby.AbstractJRubyMojo
-
- de.saumya.mojo.gem.AbstractGemMojo
-
- de.saumya.mojo.tests.AbstractTestMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
public abstract class AbstractTestMojo extends de.saumya.mojo.gem.AbstractGemMojomaven wrapper around some test command.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.Stringmodesrun tests with list of ruby modes 1.8, 1.9, 2.0, 2.2protected booleanskipskip all testsprotected booleanskipTestsskip all testsprotected java.io.FilesummaryReportThe name of the summary (xml-)report which can be used by TeamCity and Co.protected java.io.FiletestReportDirectoryprotected java.lang.Stringversionsrun tests with a several versions of jruby-
Fields inherited from class de.saumya.mojo.gem.AbstractGemMojo
binDirectory, gemHome, gemHomes, gemPath, gemsConfig, gemsInstaller, gemUseSystem, includeGemsInResources, includeLibDirectoryInResources, includeOpenSSL, includeProvidedRubygemsInResources, includeRubygemsInResources, includeRubygemsInTestResources, installRDoc, installRI, manager, plugin, supportNative, unzip
-
Fields inherited from class de.saumya.mojo.jruby.AbstractJRubyMojo
addProjectClasspath, args, classRealm, DEFAULT_JRUBY_VERSION, eclipseRefresh, eclipseWatches, env, factory, JRUBY_COMPLETE, JRUBY_CORE, JRUBY_STDLIB, jrubyFork, jrubyJvmArgs, jrubySwitches, jrubyVerbose, libDirectory, localRepository, logger, project, repositorySystem, rubySourceDirectory
-
-
Constructor Summary
Constructors Constructor Description AbstractTestMojo()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidexecuteWithGems()protected abstract TestScriptFactorynewTestScriptFactory()protected abstract JRubyRun.ResultrunIt(de.saumya.mojo.ruby.script.ScriptFactory factory, de.saumya.mojo.jruby.JRubyVersion.Mode mode, de.saumya.mojo.jruby.JRubyVersion version, TestScriptFactory testScriptFactory)protected voidrunIt(JRubyRun run, TestScriptFactory testScriptFactory)-
Methods inherited from class de.saumya.mojo.gem.AbstractGemMojo
addResource, execute, executeJRuby, gemHome, getRemoteRepos, newScriptFactory
-
Methods inherited from class de.saumya.mojo.jruby.AbstractJRubyMojo
getDefaultJRubyVersion, getJrubyVersion, getProjectClasspath, launchDirectory, resolveJRubyArtifact, resolveJRubyCompleteArtifact, resolveJRubyStdlibArtifact
-
-
-
-
Field Detail
-
testReportDirectory
@Parameter(defaultValue="${project.build.directory}/surefire-reports") protected java.io.File testReportDirectory
-
skipTests
@Parameter(property="skipTests", defaultValue="false") protected boolean skipTestsskip all tests
-
skip
@Parameter(property="maven.test.skip", defaultValue="false") protected boolean skipskip all tests
-
modes
@Parameter(property="jruby.modes") protected java.lang.String modes
run tests with list of ruby modes 1.8, 1.9, 2.0, 2.2
-
versions
@Parameter(property="jruby.versions") protected java.lang.String versions
run tests with a several versions of jruby
-
summaryReport
@Parameter protected java.io.File summaryReport
The name of the summary (xml-)report which can be used by TeamCity and Co.
-
-
Method Detail
-
executeWithGems
protected void executeWithGems() throws org.apache.maven.plugin.MojoExecutionException, java.io.IOException, de.saumya.mojo.ruby.script.ScriptException, de.saumya.mojo.ruby.gems.GemException- Specified by:
executeWithGemsin classde.saumya.mojo.gem.AbstractGemMojo- Throws:
org.apache.maven.plugin.MojoExecutionExceptionjava.io.IOExceptionde.saumya.mojo.ruby.script.ScriptExceptionde.saumya.mojo.ruby.gems.GemException
-
runIt
protected void runIt(JRubyRun run, TestScriptFactory testScriptFactory) throws org.apache.maven.plugin.MojoExecutionException, java.io.IOException, de.saumya.mojo.ruby.script.ScriptException
- Throws:
org.apache.maven.plugin.MojoExecutionExceptionjava.io.IOExceptionde.saumya.mojo.ruby.script.ScriptException
-
newTestScriptFactory
protected abstract TestScriptFactory newTestScriptFactory()
-
runIt
protected abstract JRubyRun.Result runIt(de.saumya.mojo.ruby.script.ScriptFactory factory, de.saumya.mojo.jruby.JRubyVersion.Mode mode, de.saumya.mojo.jruby.JRubyVersion version, TestScriptFactory testScriptFactory) throws java.io.IOException, de.saumya.mojo.ruby.script.ScriptException, org.apache.maven.plugin.MojoExecutionException
- Throws:
java.io.IOExceptionde.saumya.mojo.ruby.script.ScriptExceptionorg.apache.maven.plugin.MojoExecutionException
-
-