@Deprecated @Component(role=RepositoryTool.class) public class RepositoryTool extends java.lang.Object implements org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable
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.
Modifier and Type | Field and Description |
---|---|
private org.apache.maven.artifact.factory.ArtifactFactory |
artifactFactory
Deprecated.
|
private org.apache.maven.artifact.installer.ArtifactInstaller |
artifactInstaller
Deprecated.
|
private org.codehaus.plexus.PlexusContainer |
container
Deprecated.
|
private org.apache.maven.plugin.LegacySupport |
legacySupport
Deprecated.
|
private org.apache.maven.artifact.repository.ArtifactRepositoryFactory |
repositoryFactory
Deprecated.
|
static java.lang.String |
ROLE
Deprecated.
Plexus role
|
private org.apache.maven.settings.MavenSettingsBuilder |
settingsBuilder
Deprecated.
|
Constructor and Description |
---|
RepositoryTool()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
contextualize(org.codehaus.plexus.context.Context context)
Deprecated.
Retrieve the PlexusContainer instance used to instantiate this component.
|
org.apache.maven.artifact.repository.ArtifactRepository |
createLocalArtifactRepositoryInstance()
Deprecated.
Construct an ArtifactRepository instance that refers to the normal Maven local repository.
|
org.apache.maven.artifact.repository.ArtifactRepository |
createLocalArtifactRepositoryInstance(java.io.File localRepositoryDirectory)
Deprecated.
Construct an ArtifactRepository instance that refers to the test-time Maven local repository.
|
void |
createLocalRepositoryFromComponentProject(org.apache.maven.project.MavenProject project,
java.io.File realPomFile,
java.io.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.
|
java.io.File |
findLocalRepositoryDirectory()
Deprecated.
Lookup and return the location of the normal Maven local repository.
|
private void |
installLocallyReachableAncestorPoms(java.io.File realPomFile,
org.apache.maven.artifact.repository.ArtifactRepository localRepo)
Deprecated.
Traverse <relativePath/> links for successive POMs in the plugin's ancestry, installing
each one into the test-time local repository.
|
public static final java.lang.String ROLE
@Requirement private org.apache.maven.artifact.repository.ArtifactRepositoryFactory repositoryFactory
@Requirement private org.apache.maven.settings.MavenSettingsBuilder settingsBuilder
@Requirement private org.apache.maven.artifact.factory.ArtifactFactory artifactFactory
@Requirement private org.apache.maven.artifact.installer.ArtifactInstaller artifactInstaller
@Requirement private org.apache.maven.plugin.LegacySupport legacySupport
private org.codehaus.plexus.PlexusContainer container
public java.io.File findLocalRepositoryDirectory() throws TestToolsException
TestToolsException
- if anypublic org.apache.maven.artifact.repository.ArtifactRepository createLocalArtifactRepositoryInstance() throws TestToolsException
TestToolsException
- if anypublic org.apache.maven.artifact.repository.ArtifactRepository createLocalArtifactRepositoryInstance(java.io.File localRepositoryDirectory) throws TestToolsException
localRepositoryDirectory
- The location of the local repository to be used for test builds.TestToolsException
- if anypublic void createLocalRepositoryFromComponentProject(org.apache.maven.project.MavenProject project, java.io.File realPomFile, java.io.File targetLocalRepoBasedir) throws TestToolsException
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.
project
- realPomFile
- targetLocalRepoBasedir
- TestToolsException
- if anyprivate void installLocallyReachableAncestorPoms(java.io.File realPomFile, org.apache.maven.artifact.repository.ArtifactRepository localRepo) throws TestToolsException
realPomFile
- The real plugin POM; a starting point, but the POM is already installed,
so we won't actually install this file, only use it to locate parents.localRepo
- The test-time local repository instanceTestToolsException
- if anypublic void contextualize(org.codehaus.plexus.context.Context context) throws org.codehaus.plexus.context.ContextException
contextualize
in interface org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable
org.codehaus.plexus.context.ContextException
Contextualizable.contextualize(org.codehaus.plexus.context.Context)