Class RepositoryTool
java.lang.Object
org.apache.maven.shared.test.plugin.RepositoryTool
- All Implemented Interfaces:
org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable
@Deprecated
@Component(role=RepositoryTool.class)
public class RepositoryTool
extends Object
implements org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable
Deprecated.
Tools to access and manage Maven repositories for test builds, including construction of a local
repository directory structure.
WARNING: Currently, the createLocalRepositoryFromPlugin
method 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$
- Author:
- jdcasey
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
contextualize
(org.codehaus.plexus.context.Context context) Deprecated.Retrieve the PlexusContainer instance used to instantiate this component.org.apache.maven.artifact.repository.ArtifactRepository
Deprecated.Construct an ArtifactRepository instance that refers to the normal Maven local repository.org.apache.maven.artifact.repository.ArtifactRepository
createLocalArtifactRepositoryInstance
(File localRepositoryDirectory) Deprecated.Construct an ArtifactRepository instance that refers to the test-time Maven local repository.void
createLocalRepositoryFromComponentProject
(org.apache.maven.project.MavenProject project, File realPomFile, File targetLocalRepoBasedir) Deprecated.Install a test version of a plugin - along with its POM, and as many ancestor POMs as can be reached using the <relativePath/> element - to a clean local repository directory for use in test builds.Deprecated.Lookup and return the location of the normal Maven local repository.
-
Field Details
-
ROLE
Deprecated.Plexus role
-
-
Constructor Details
-
RepositoryTool
public RepositoryTool()Deprecated.
-
-
Method Details
-
findLocalRepositoryDirectory
Deprecated.Lookup and return the location of the normal Maven local repository.- Returns:
- the location of the normal Maven local repository.
- Throws:
TestToolsException
- if any
-
createLocalArtifactRepositoryInstance
public org.apache.maven.artifact.repository.ArtifactRepository createLocalArtifactRepositoryInstance() throws TestToolsExceptionDeprecated.Construct an ArtifactRepository instance that refers to the normal Maven local repository.- Returns:
- an ArtifactRepository instance
- Throws:
TestToolsException
- if any
-
createLocalArtifactRepositoryInstance
public org.apache.maven.artifact.repository.ArtifactRepository createLocalArtifactRepositoryInstance(File localRepositoryDirectory) throws TestToolsException Deprecated.Construct an ArtifactRepository instance that refers to the test-time Maven local repository.- Parameters:
localRepositoryDirectory
- The location of the local repository to be used for test builds.- Returns:
- an ArtifactRepository instance
- Throws:
TestToolsException
- if any
-
createLocalRepositoryFromComponentProject
public void createLocalRepositoryFromComponentProject(org.apache.maven.project.MavenProject project, File realPomFile, File targetLocalRepoBasedir) throws TestToolsException Deprecated.Install a test version of a plugin - along with its POM, and as many ancestor POMs as can be reached using the <relativePath/> element - to a clean local repository directory for use in test builds.WARNING: Currently, this method 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.
- Parameters:
project
-realPomFile
-targetLocalRepoBasedir
-- Throws:
TestToolsException
- if any
-
contextualize
public void contextualize(org.codehaus.plexus.context.Context context) throws org.codehaus.plexus.context.ContextException Deprecated.Retrieve the PlexusContainer instance used to instantiate this component. The container is used to retrieve the default ArtifactRepositoryLayout component, for use in constructing instances of ArtifactRepository that can be used to access local repositories.- Specified by:
contextualize
in interfaceorg.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable
- Throws:
org.codehaus.plexus.context.ContextException
- See Also:
-
Contextualizable.contextualize(org.codehaus.plexus.context.Context)
-