public abstract class AbstractWarMojoTest extends AbstractMojoTestCase
| Modifier and Type | Field and Description |
|---|---|
protected static String |
MANIFEST_PATH |
protected static File |
OVERLAYS_ROOT_DIR |
protected static File |
OVERLAYS_TEMP_DIR |
| Constructor and Description |
|---|
AbstractWarMojoTest() |
| Modifier and Type | Method and Description |
|---|---|
protected ArtifactStub |
buildWarOverlayStub(String id)
Builds a test overlay.
|
protected void |
configureMojo(AbstractWarMojo mojo,
List<String> filters,
File classesDir,
File webAppSource,
File webAppDir,
MavenProjectBasicStub project)
initialize required parameters
|
protected void |
createArchive(File directory,
File destinationFile) |
protected File |
createClassesDir(String id,
boolean empty)
create a class directory with or without a sample class
|
protected void |
createDir(File dir) |
protected void |
createFile(File testFile) |
protected void |
createFile(File testFile,
String body) |
protected File |
createWebAppSource(String id) |
protected File |
createWebAppSource(String id,
boolean createSamples)
create an isolated web source with a sample jsp file
|
protected File |
createXMLConfigDir(String id,
String[] xmlFiles)
create an isolated xml dir
|
protected File |
generateFullOverlayWar(String id)
Generates test war.
|
protected File |
getOverlayFile(String id,
String filePath) |
protected abstract File |
getTestDirectory() |
protected File |
getWebAppSource(String id)
Returns the webapp source directory for the specified id.
|
configureMojo, configureMojo, extractPluginConfiguration, extractPluginConfiguration, getContainer, getPluginDescriptorLocation, getPluginDescriptorPath, getPublicDescriptorStream, getVariablesAndValuesFromObject, getVariablesAndValuesFromObject, getVariableValueFromObject, lookupConfiguredMojo, lookupConfiguredMojo, lookupEmptyMojo, lookupEmptyMojo, lookupMojo, lookupMojo, lookupMojo, newMavenSession, newMojoExecution, setUp, setupContainer, setupContainerConfiguration, setVariableValueToObjectcustomizeComponentConfiguration, customizeContainerConfiguration, customizeContext, getBasedir, getClassLoader, getConfiguration, getConfiguration, getConfigurationName, getCustomConfigurationName, getResourceAsStream, getTestConfiguration, getTestConfiguration, getTestFile, getTestFile, getTestPath, getTestPath, lookup, lookup, lookup, lookup, release, tearDownassertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, runTest, setName, toStringprotected static final File OVERLAYS_TEMP_DIR
protected static final File OVERLAYS_ROOT_DIR
protected static final String MANIFEST_PATH
protected void configureMojo(AbstractWarMojo mojo, List<String> filters, File classesDir, File webAppSource, File webAppDir, MavenProjectBasicStub project) throws Exception
mojo - The mojo to be tested.filters - The list of filters.classesDir - The classes directory.webAppSource - The webAppSource.webAppDir - The webAppDir folder.project - The Maven project.Exception - in case of errorsprotected File createXMLConfigDir(String id, String[] xmlFiles) throws Exception
id - The id.xmlFiles - array of xml files.Exception - in case of errors.protected File getWebAppSource(String id) throws Exception
id - the id of the testException - if an exception occursprotected File createWebAppSource(String id, boolean createSamples) throws Exception
id - The id.createSamples - Create example files yes or no.Exception - in case of errors.protected File createClassesDir(String id, boolean empty) throws Exception
id - The id.empty - true to create a class files false otherwise.Exception - in case of errors.protected void createDir(File dir)
protected File generateFullOverlayWar(String id) throws Exception
id - the id of the overlay containing the full structureException - if an error occursprotected ArtifactStub buildWarOverlayStub(String id)
id - the id of the overlay (see test/resources/overlays)Copyright © 2002–2017 The Apache Software Foundation. All rights reserved.