Class AbstractTestMojo

  • All Implemented Interfaces:
    org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

    public abstract class AbstractTestMojo
    extends de.saumya.mojo.gem.AbstractGemMojo
    maven wrapper around some test command.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.lang.String modes
      run tests with list of ruby modes 1.8, 1.9, 2.0, 2.2
      protected boolean skip
      skip all tests
      protected boolean skipTests
      skip all tests
      protected java.io.File summaryReport
      The name of the summary (xml-)report which can be used by TeamCity and Co.
      protected java.io.File testReportDirectory  
      protected java.lang.String versions
      run 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
      • Fields inherited from interface org.apache.maven.plugin.Mojo

        ROLE
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected void executeWithGems()  
      protected abstract TestScriptFactory newTestScriptFactory()  
      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)  
      protected void runIt​(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
      • Methods inherited from class org.apache.maven.plugin.AbstractMojo

        getLog, getPluginContext, setLog, setPluginContext
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • testReportDirectory

        @Parameter(defaultValue="${project.build.directory}/surefire-reports")
        protected java.io.File testReportDirectory
      • skipTests

        @Parameter(property="skipTests",
                   defaultValue="false")
        protected boolean skipTests
        skip all tests
      • skip

        @Parameter(property="maven.test.skip",
                   defaultValue="false")
        protected boolean skip
        skip 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.
    • Constructor Detail

      • AbstractTestMojo

        public AbstractTestMojo()
    • 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:
        executeWithGems in class de.saumya.mojo.gem.AbstractGemMojo
        Throws:
        org.apache.maven.plugin.MojoExecutionException
        java.io.IOException
        de.saumya.mojo.ruby.script.ScriptException
        de.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.MojoExecutionException
        java.io.IOException
        de.saumya.mojo.ruby.script.ScriptException
      • 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.IOException
        de.saumya.mojo.ruby.script.ScriptException
        org.apache.maven.plugin.MojoExecutionException