public abstract class AbstractEclipsePluginIT extends AbstractMojoTestCase
Modifier and Type | Field and Description |
---|---|
protected static String |
ARTIFACT_ID
Artifact-Id for running test builds.
|
protected static String |
GROUP_ID
Group-Id for running test builds.
|
protected static File |
localRepositoryDirectory
Test repository directory.
|
protected static File |
PomFile
Pom File
|
protected static String |
VERSION
Version under which the plugin was installed to the test-time local repository for running test builds.
|
Constructor and Description |
---|
AbstractEclipsePluginIT() |
Modifier and Type | Method and Description |
---|---|
protected void |
assertContains(String message,
String full,
String substring) |
protected void |
assertDoesNotContain(String message,
String full,
String substring) |
protected void |
assertFileEquals(File expectedFile,
File actualFile) |
protected void |
assertNotAvailableMarkerFileDoesNotExist(String groupId,
String artifactId,
String version,
String classifier,
String inClassifier)
Assert that the not available marker file does not exist for the specified artifact details.
|
protected void |
assertNotAvailableMarkerFileExists(String groupId,
String artifactId,
String version,
String classifier,
String inClassifier)
Assert that the not available marker file exists for the specified artifact details.
|
protected void |
compareDirectoryContent(File basedir,
File projectOutputDir) |
protected void |
executeMaven(File pom,
Properties properties,
List goals) |
protected void |
executeMaven(File pom,
Properties properties,
List goals,
boolean switchLocalRepo) |
protected File |
getMavenHome() |
protected File |
getNotAvailableMarkerFile(String groupId,
String artifactId,
String version,
String classifier,
String inClassifier)
Return the not available marker file for the specified artifact details.
|
protected File |
getOutputDirectory(String projectName) |
protected String |
getPluginCLISpecification() |
protected File |
getTestWorkspaceWorkDirectory(String projectName) |
protected MavenProject |
readProject(File pom) |
protected void |
setUp() |
protected void |
tearDown() |
protected void |
testProject(File basedir)
Execute the eclipse:eclipse goal on a test project and verify generated files.
|
protected void |
testProject(File basedir,
Properties properties,
String cleanGoal,
String genGoal) |
protected void |
testProject(File basedir,
Properties properties,
String cleanGoal,
String genGoal,
boolean withInstall)
Execute the eclipse:eclipse goal on a test project and verify generated files.
|
protected void |
testProject(String projectName)
Execute the eclipse:eclipse goal on a test project and verify generated files.
|
protected void |
testProject(String projectName,
Properties properties,
String cleanGoal,
String genGoal)
Execute the eclipse:eclipse goal on a test project and verify generated files.
|
protected void |
testProject(String projectName,
Properties properties,
String cleanGoal,
String genGoal,
boolean withInstall)
Execute the eclipse:eclipse goal on a test project and verify generated files.
|
protected void |
testWorkspace(String projectName)
Execute the eclipse:configure-workspace goal on a test project and verify generated files.
|
protected void |
testWorkspace(String projectName,
Properties properties,
String genGoal)
Execute the eclipse:configure-workspace goal on a test project and verify generated files.
|
protected void |
testWorkspace(String projectName,
String goal)
Execute the eclipse:configure-workspace goal on a test project and verify generated files.
|
configureMojo, configureMojo, extractPluginConfiguration, extractPluginConfiguration, getVariablesAndValuesFromObject, getVariablesAndValuesFromObject, getVariableValueFromObject, lookupEmptyMojo, lookupEmptyMojo, lookupMojo, lookupMojo, lookupMojo, setVariableValueToObject
createContainerInstance, customizeContext, customizeContext, getBasedir, getClassLoader, getConfiguration, getConfiguration, getContainer, getCustomConfiguration, getResourceAsStream, getTestFile, getTestFile, getTestPath, getTestPath, lookup, lookup, release
assertEquals, 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, toString
protected static File localRepositoryDirectory
protected static File PomFile
protected static final String GROUP_ID
protected static final String ARTIFACT_ID
protected static final String VERSION
protected void setUp() throws Exception
setUp
in class AbstractMojoTestCase
Exception
PlexusTestCase.setUp()
protected void tearDown() throws Exception
tearDown
in class org.codehaus.plexus.PlexusTestCase
Exception
PlexusTestCase.tearDown()
protected final File getMavenHome()
protected void testProject(String projectName) throws Exception
projectName
- project directoryException
- any exception generated during testprotected void testProject(File basedir) throws Exception
basedir
- basedir of mvn executionException
- any exception generated during testprotected void testProject(String projectName, Properties properties, String cleanGoal, String genGoal) throws Exception
projectName
- project directoryproperties
- additional propertiescleanGoal
- TODOgenGoal
- TODOException
- any exception generated during testprotected void testProject(String projectName, Properties properties, String cleanGoal, String genGoal, boolean withInstall) throws Exception
projectName
- project directoryproperties
- additional propertiescleanGoal
- TODOgenGoal
- TODOwithInstall
- true to include the install goal, false to exclude it.Exception
- any exception generated during testprotected void testProject(File basedir, Properties properties, String cleanGoal, String genGoal) throws Exception
basedir
- Execute the eclipse:eclipse goal on a test project and verify generated files.properties
- additional propertiescleanGoal
- TODOgenGoal
- TODOException
- any exception generated during testprotected void testProject(File basedir, Properties properties, String cleanGoal, String genGoal, boolean withInstall) throws Exception
basedir
- basedir of mvn executionproperties
- additional propertiescleanGoal
- TODOgenGoal
- TODOwithInstall
- true to include the install goal, false to exclude it.Exception
- any exception generated during testprotected void testWorkspace(String projectName) throws Exception
projectName
- project directoryException
- any exception generated during testprotected void testWorkspace(String projectName, String goal) throws Exception
projectName
- project directoryException
- any exception generated during testprotected void testWorkspace(String projectName, Properties properties, String genGoal) throws Exception
projectName
- project directoryproperties
- additional propertiescleanGoal
- TODOgenGoal
- TODOException
- any exception generated during testprotected void executeMaven(File pom, Properties properties, List goals) throws TestToolsException, ExecutionFailedException
protected void executeMaven(File pom, Properties properties, List goals, boolean switchLocalRepo) throws TestToolsException, ExecutionFailedException
protected MavenProject readProject(File pom) throws TestToolsException
TestToolsException
protected String getPluginCLISpecification()
protected void compareDirectoryContent(File basedir, File projectOutputDir) throws MojoExecutionException
basedir
- the base directory of the projectprojectOutputDir
- the directory where the eclipse plugin will write the output files.MojoExecutionException
protected void assertFileEquals(File expectedFile, File actualFile) throws MojoExecutionException
MojoExecutionException
protected void assertDoesNotContain(String message, String full, String substring)
protected File getNotAvailableMarkerFile(String groupId, String artifactId, String version, String classifier, String inClassifier) throws Exception
groupId
- group id of artifactartifactId
- artifact id of artifactversion
- version of artifactclassifier
- the classifier of the artifactinClassifier
- the sources/javadocs to be attachedException
- failures.IdeUtils.createArtifactWithClassifier(String, String, String, String, String, ArtifactFactory)
protected void assertNotAvailableMarkerFileExists(String groupId, String artifactId, String version, String classifier, String inClassifier) throws Exception
groupId
- group id of artifactartifactId
- artifact id of artifactversion
- version of artifactclassifier
- the classifier of the artifactinClassifier
- the sources/javadocs to be attachedException
- failuresprotected void assertNotAvailableMarkerFileDoesNotExist(String groupId, String artifactId, String version, String classifier, String inClassifier) throws Exception
groupId
- group id of artifactartifactId
- artifact id of artifactversion
- version of artifactclassifier
- the classifier of the artifactinClassifier
- the sources/javadocs to be attachedException
- failuresCopyright © 2002–2015 The Apache Software Foundation. All rights reserved.