@Deprecated @Component(role=ProjectTool.class) public class ProjectTool extends Object
Modifier and Type | Field and Description |
---|---|
static String |
INTEGRATION_TEST_DEPLOYMENT_REPO_URL
Deprecated.
|
static String |
ROLE
Deprecated.
Plexus role
|
Constructor and Description |
---|
ProjectTool()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
protected org.apache.maven.shared.test.plugin.ProjectTool.PomInfo |
manglePomForTesting(File pomFile,
String testVersion,
boolean skipUnitTests)
Deprecated.
Inject a special version for testing, to allow tests to unambiguously reference the plugin
currently under test.
|
MavenProject |
packageProjectArtifact(File pomFile,
String testVersion,
boolean skipUnitTests)
Deprecated.
Run the plugin's Maven build up to the package phase, in order to produce a jar file for
distribution to a test-time local repository.
|
MavenProject |
packageProjectArtifact(File pomFile,
String testVersion,
boolean skipUnitTests,
File logFile)
Deprecated.
Run the plugin's Maven build up to the package phase, in order to produce a jar file for
distribution to a test-time local repository.
|
MavenProject |
readProject(File pomFile)
Deprecated.
Construct a MavenProject instance from the specified POM file.
|
MavenProject |
readProject(File pomFile,
File localRepositoryBasedir)
Deprecated.
Construct a MavenProject instance from the specified POM file, using the specified local
repository directory to resolve ancestor POMs as needed.
|
MavenProject |
readProjectWithDependencies(File pomFile)
Deprecated.
Construct a MavenProject instance from the specified POM file with dependencies.
|
MavenProject |
readProjectWithDependencies(File pomFile,
File localRepositoryBasedir)
Deprecated.
Construct a MavenProject instance from the specified POM file with dependencies, using the specified local
repository directory to resolve ancestor POMs as needed.
|
public static final String ROLE
public static final String INTEGRATION_TEST_DEPLOYMENT_REPO_URL
public MavenProject readProject(File pomFile) throws TestToolsException
pomFile
- current POM fileTestToolsException
- if anypublic MavenProject readProject(File pomFile, File localRepositoryBasedir) throws TestToolsException
pomFile
- current POM filelocalRepositoryBasedir
- TestToolsException
- if anypublic MavenProject readProjectWithDependencies(File pomFile) throws TestToolsException
pomFile
- current POM fileTestToolsException
- if anypublic MavenProject readProjectWithDependencies(File pomFile, File localRepositoryBasedir) throws TestToolsException
pomFile
- current POM filelocalRepositoryBasedir
- TestToolsException
- if anypublic MavenProject packageProjectArtifact(File pomFile, String testVersion, boolean skipUnitTests) throws TestToolsException
pomFile
- The plugin's POMtestVersion
- The version to use for testing this plugin. To promote test resiliency,
this version should remain unchanged, regardless of what plugin version is under
development.skipUnitTests
- In cases where test builds occur during the unit-testing phase (usually
a bad testing smell), the plugin jar must be produced without running unit tests.
Otherwise, the testing process will result in a recursive loop of building a plugin jar and
trying to unit test it during the build. In these cases, set this flag to true
.TestToolsException
- if anypublic MavenProject packageProjectArtifact(File pomFile, String testVersion, boolean skipUnitTests, File logFile) throws TestToolsException
pomFile
- The plugin's POMtestVersion
- The version to use for testing this plugin. To promote test resiliency,
this version should remain unchanged, regardless of what plugin version is under
development.skipUnitTests
- In cases where test builds occur during the unit-testing phase (usually
a bad testing smell), the plugin jar must be produced without running unit tests.
Otherwise, the testing process will result in a recursive loop of building a plugin jar and
trying to unit test it during the build. In these cases, set this flag to true
.logFile
- The file to which build output should be logged, in order to allow later
inspection in case this build fails.TestToolsException
- if anyprotected org.apache.maven.shared.test.plugin.ProjectTool.PomInfo manglePomForTesting(File pomFile, String testVersion, boolean skipUnitTests) throws TestToolsException
maven-surefire-plugin
to allow production of a test-only version of the plugin jar without running unit tests.pomFile
- The plugin POMtestVersion
- The version that allows test builds to reference the plugin under testskipUnitTests
- If true, configure the surefire plugin to skip unit testsTestToolsException
- if anyCopyright © 2008–2014 The Apache Software Foundation. All rights reserved.