net.jangaroo.jooc.mvnplugin.test
Class JooTestMojoBase

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by net.jangaroo.jooc.mvnplugin.test.JooTestMojoBase
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
Direct Known Subclasses:
JettyRunTestsMojo, JooTestMojo

public abstract class JooTestMojoBase
extends org.apache.maven.plugin.AbstractMojo

Base class for running tests either automatically (JooTestMojo) or start test Jetty and keep it running (JettyRunTestsMojo).


Field Summary
protected  boolean debugTests
          Whether to load the test application in debug mode (#joo.debug).
protected  org.apache.maven.project.MavenProject project
          The maven project.
protected  File testOutputDirectory
          Directory whose joo/classes sub-directory contains compiled test classes.
protected  List<org.apache.maven.model.Resource> testResources
          the project's test resources
protected  String testsHtml
          the tests.html file relative to the test resources folder
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
JooTestMojoBase()
           
 
Method Summary
protected  List<File> findJars()
           
protected static String getJettyUrl(org.eclipse.jetty.server.Server server)
           
protected  String getTestUrl(org.eclipse.jetty.server.Server server)
           
protected  boolean isTestAvailable()
           
protected  org.eclipse.jetty.server.Server jettyRunTest(boolean tryPortRange)
           
protected  void stopServerIgnoreException(org.eclipse.jetty.server.Server server)
           
protected  org.apache.maven.plugin.MojoExecutionException wrap(Exception e)
           
 
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
 
Methods inherited from interface org.apache.maven.plugin.Mojo
execute
 

Field Detail

project

protected org.apache.maven.project.MavenProject project
The maven project.


testOutputDirectory

protected File testOutputDirectory
Directory whose joo/classes sub-directory contains compiled test classes.


testsHtml

protected String testsHtml
the tests.html file relative to the test resources folder


debugTests

protected boolean debugTests
Whether to load the test application in debug mode (#joo.debug).


testResources

protected List<org.apache.maven.model.Resource> testResources
the project's test resources

Constructor Detail

JooTestMojoBase

public JooTestMojoBase()
Method Detail

getJettyUrl

protected static String getJettyUrl(org.eclipse.jetty.server.Server server)
                             throws org.apache.maven.plugin.MojoExecutionException
Throws:
org.apache.maven.plugin.MojoExecutionException

isTestAvailable

protected boolean isTestAvailable()

jettyRunTest

protected org.eclipse.jetty.server.Server jettyRunTest(boolean tryPortRange)
                                                throws org.apache.maven.plugin.MojoExecutionException
Throws:
org.apache.maven.plugin.MojoExecutionException

findJars

protected List<File> findJars()
                       throws org.apache.maven.artifact.DependencyResolutionRequiredException
Throws:
org.apache.maven.artifact.DependencyResolutionRequiredException

wrap

protected org.apache.maven.plugin.MojoExecutionException wrap(Exception e)

stopServerIgnoreException

protected void stopServerIgnoreException(org.eclipse.jetty.server.Server server)

getTestUrl

protected String getTestUrl(org.eclipse.jetty.server.Server server)
                     throws org.apache.maven.plugin.MojoExecutionException
Throws:
org.apache.maven.plugin.MojoExecutionException


Copyright © 2002–2014 CoreMedia AG. All rights reserved.