Class PluginTestTool
- java.lang.Object
-
- org.apache.maven.shared.test.plugin.PluginTestTool
-
@Deprecated @Component(role=PluginTestTool.class) public class PluginTestTool extends java.lang.Object
Deprecated.Test tool that provides a single point of access for staging a plugin artifact - along with its POM lineage - into a clean test-time local repository. This involves modifying the plugin POM to provide a stable test-time version for test-build POMs to reference, then installing the plugin jar and associated POMs (including those ancestors that are reachable using <relativePath>) into the test local repository.WARNING: Currently, the
RepositoryTool
will not resolve parent POMs that exist only in your normal local repository, and are not reachable using the relativePath element. This may result in failed test builds, as one or more of the plugin's ancestor POMs cannot be resolved.- Version:
- $Id$
-
-
Field Summary
Fields Modifier and Type Field Description private ProjectTool
projectTool
Deprecated.private RepositoryTool
repositoryTool
Deprecated.static java.lang.String
ROLE
Deprecated.Plexus role
-
Constructor Summary
Constructors Constructor Description PluginTestTool()
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description private java.io.File
prepareForTesting(java.io.File pomFile, java.lang.String testVersion, boolean skipUnitTests, java.io.File localRepositoryDir)
Deprecated.java.io.File
preparePluginForIntegrationTesting(java.io.File pomFile, java.lang.String testVersion)
Deprecated.Stage the plugin, using a stable version, into a temporary local-repository directory that is generated by this method.java.io.File
preparePluginForIntegrationTesting(java.io.File pomFile, java.lang.String testVersion, java.io.File localRepositoryDir)
Deprecated.Stage the plugin, using a stable version, into the specified local-repository directory.java.io.File
preparePluginForUnitTestingWithMavenBuilds(java.io.File pomFile, java.lang.String testVersion)
Deprecated.Stage the plugin, using a stable version, into a temporary local-repository directory that is generated by this method.java.io.File
preparePluginForUnitTestingWithMavenBuilds(java.io.File pomFile, java.lang.String testVersion, java.io.File localRepositoryDir)
Deprecated.Stage the plugin, using a stable version, into the specified local-repository directory.
-
-
-
Field Detail
-
ROLE
public static final java.lang.String ROLE
Deprecated.Plexus role
-
projectTool
@Requirement private ProjectTool projectTool
Deprecated.
-
repositoryTool
@Requirement private RepositoryTool repositoryTool
Deprecated.
-
-
Method Detail
-
preparePluginForIntegrationTesting
public java.io.File preparePluginForIntegrationTesting(java.io.File pomFile, java.lang.String testVersion) throws TestToolsException
Deprecated.Stage the plugin, using a stable version, into a temporary local-repository directory that is generated by this method. When the plugin is staged, return the local repository base directory for use in test builds.- Parameters:
pomFile
- current POM filetestVersion
- The test version for the plugin, used for reference in test-build POMs and fully-qualified goals- Returns:
- The base-directory location of the generated local repository
- Throws:
TestToolsException
- if any
-
preparePluginForUnitTestingWithMavenBuilds
public java.io.File preparePluginForUnitTestingWithMavenBuilds(java.io.File pomFile, java.lang.String testVersion) throws TestToolsException
Deprecated.Stage the plugin, using a stable version, into a temporary local-repository directory that is generated by this method. When the plugin is staged, return the local repository base directory for use in test builds. This method also skips unit testing during plugin jar production, since it is assumed that executing these tests would lead to a recursive test-and-build loop.- Parameters:
pomFile
- current POM filetestVersion
- The test version for the plugin, used for reference in test-build POMs and fully-qualified goals- Returns:
- The base-directory location of the generated local repository
- Throws:
TestToolsException
- if any
-
preparePluginForIntegrationTesting
public java.io.File preparePluginForIntegrationTesting(java.io.File pomFile, java.lang.String testVersion, java.io.File localRepositoryDir) throws TestToolsException
Deprecated.Stage the plugin, using a stable version, into the specified local-repository directory. When the plugin is staged, return the local repository base directory for verification.- Parameters:
pomFile
- current POM filetestVersion
- The test version for the plugin, used for reference in test-build POMs and fully-qualified goalslocalRepositoryDir
- The base-directory location of the test local repository, into which the plugin's test version should be staged.- Returns:
- The base-directory location of the generated local repository
- Throws:
TestToolsException
- if any
-
preparePluginForUnitTestingWithMavenBuilds
public java.io.File preparePluginForUnitTestingWithMavenBuilds(java.io.File pomFile, java.lang.String testVersion, java.io.File localRepositoryDir) throws TestToolsException
Deprecated.Stage the plugin, using a stable version, into the specified local-repository directory. When the plugin is staged, return the local repository base directory for verification. This method also skips unit testing during plugin jar production, since it is assumed that executing these tests would lead to a recursive test-and-build loop.- Parameters:
pomFile
- current POM filetestVersion
- The test version for the plugin, used for reference in test-build POMs and fully-qualified goalslocalRepositoryDir
- The base-directory location of the test local repository, into which the plugin's test version should be staged.- Returns:
- The base-directory location of the generated local repository
- Throws:
TestToolsException
- if any
-
prepareForTesting
private java.io.File prepareForTesting(java.io.File pomFile, java.lang.String testVersion, boolean skipUnitTests, java.io.File localRepositoryDir) throws TestToolsException
Deprecated.- Throws:
TestToolsException
-
-