org.codehaus.mojo.gwt.shell
Class TestMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.codehaus.mojo.gwt.AbstractGwtMojo
org.codehaus.mojo.gwt.AbstractGwtModuleMojo
org.codehaus.mojo.gwt.shell.AbstractGwtShellMojo
org.codehaus.mojo.gwt.shell.TestMojo
- All Implemented Interfaces:
- ContextEnabled, Mojo, GwtModuleReader
- Direct Known Subclasses:
- EclipseTestMojo
public class TestMojo
- extends AbstractGwtShellMojo
Mimic surefire to run GWTTestCases during integration-test phase, until SUREFIRE-508 is fixed
- Version:
- $Id: TestMojo.java 9466 2009-04-16 12:03:15Z ndeloof $
- Author:
- Nicolas De Loof
- See Also:
http://code.google.com/intl/fr/webtoolkit/doc/latest/DevGuideTesting.html
- Is bound to the specified phase of the standard build lifecycle:
- integration-test
- Requires the dependencies in this specified scope:
- test
- Is defined by the goal name:
- test
Field Summary |
protected String |
excludes
Comma separated list of ant-style exclusion patterns for GWT integration tests |
protected String |
includes
Comma separated list of ant-style inclusion patterns for GWT integration tests. |
Fields inherited from interface org.apache.maven.plugin.Mojo |
ROLE |
Methods inherited from class org.codehaus.mojo.gwt.AbstractGwtMojo |
addClasspathElements, getClasspath, getGenerateDirectory, getGwtDevJar, getGwtUserJar, getLocalRepository, getOutputDirectory, getProject, getProjectArtifacts, getRemoteRepositories, resolve |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
includes
protected String includes
- Comma separated list of ant-style inclusion patterns for GWT integration tests. For example,
can be set to
**\/*GwtTest.java
to match all test class following this naming
convention. Surefire plugin may then ne configured to exclude such tests.
It is recommended to use a TestSuite to run GwtTests, as they require some huge setup and are
very slow. Running inside a suite allow to execute the setup only once. The default value is
defined with this best practice in mind.
- Is defined by:
- default-value:
- **\/GwtTest*.java,**\/Gwt*Suite.java
excludes
protected String excludes
- Comma separated list of ant-style exclusion patterns for GWT integration tests
- Is defined by:
TestMojo
public TestMojo()
doExecute
public void doExecute()
throws MojoExecutionException,
MojoFailureException
- Specified by:
doExecute
in class AbstractGwtShellMojo
- Throws:
MojoExecutionException
MojoFailureException
getGwtArgs
protected String getGwtArgs()
postProcessClassPath
protected void postProcessClassPath(Collection<File> classpath)
throws MojoExecutionException
- Description copied from class:
AbstractGwtShellMojo
- hook to post-process the dependency-based classpath
- Overrides:
postProcessClassPath
in class AbstractGwtShellMojo
- Throws:
MojoExecutionException
getProjectClassLoader
protected ClassLoader getProjectClassLoader()
throws DependencyResolutionRequiredException,
MalformedURLException
- Returns:
- the project classloader
- Throws:
DependencyResolutionRequiredException
- failed to resolve project dependencies
MalformedURLException
- configuration issue ?
addCompileSourceRoot
protected void addCompileSourceRoot(File path)
- Overrides:
addCompileSourceRoot
in class AbstractGwtModuleMojo
- Parameters:
path
- file to add to the project compile directories
addProjectClasspathElements
protected URL[] addProjectClasspathElements(URL[] originalUrls)
throws MojoExecutionException
- Add project classpath element to a classpath URL set
- Parameters:
originalUrls
- the initial URL set
- Returns:
- full classpath URL set
- Throws:
MojoExecutionException
- some error occured
getClassLoader
protected ClassLoader getClassLoader()
throws MojoExecutionException
- Need this to run both pre- and post- PLX-220 fix.
- Returns:
- a ClassLoader including plugin dependencies and project source foler
- Throws:
MojoExecutionException
- failed to configure ClassLoader
setTestTimeOut
public void setTestTimeOut(int testTimeOut)
- Parameters:
testTimeOut
- the testTimeOut to set
Copyright © 2007-2012 Codehaus. All Rights Reserved.