Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.mortbay.jetty.plugin
Class RuntimeDependencyResolver

    java.lang.Object
      org.mortbay.jetty.plugin.RuntimeDependencyResolver

    public class RuntimeDependencyResolver

extends java.lang.Object

RuntimeDependencyResolver This class is able to pull down a remote pom, find all of it's dependencies and transitively resolve them.

Constructor Summary
`RuntimeDependencyResolver(org.apache.maven.artifact.factory.ArtifactFactory artifactFactory, org.apache.maven.artifact.resolver.ArtifactResolver artifactResolver, org.apache.maven.artifact.metadata.ArtifactMetadataSource metadataSource, org.apache.maven.artifact.repository.ArtifactRepository localRepository, java.util.List remoteRepositories)`

Method Summary
`void` | `addDependency(java.util.Set artifacts, java.lang.String groupId, java.lang.String artifactId, java.lang.String versionId, java.lang.String type)`
`org.apache.maven.artifact.Artifact` | `getArtifact(java.lang.String groupId, java.lang.String artifactId, java.lang.String versionId, java.lang.String type)`
`org.apache.maven.artifact.Artifact` | `getPomArtifact(java.lang.String groupId, java.lang.String artifactId, java.lang.String versionId)`
`org.apache.maven.project.MavenProject` | `loadPomAsProject(org.apache.maven.project.MavenProjectBuilder projectBuilder, org.apache.maven.artifact.Artifact pomArtifact)`
`void` | `removeDependency(java.util.Set artifacts, java.lang.String groupId, java.lang.String artifactId, java.lang.String versionId, java.lang.String type)`
`java.util.Set` | `transitivelyResolvePomDependencies(org.apache.maven.project.MavenProjectBuilder projectBuilder, java.lang.String groupId, java.lang.String artifactId, java.lang.String versionId, boolean resolveProjectArtifact)` Download (if necessary) a pom, and load it as a MavenProject, transitively resolving any dependencies therein.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### RuntimeDependencyResolver

    public RuntimeDependencyResolver(org.apache.maven.artifact.factory.ArtifactFactory artifactFactory,
                                     org.apache.maven.artifact.resolver.ArtifactResolver artifactResolver,
                                     org.apache.maven.artifact.metadata.ArtifactMetadataSource metadataSource,
                                     org.apache.maven.artifact.repository.ArtifactRepository localRepository,
                                     java.util.List remoteRepositories)

Method Detail

### transitivelyResolvePomDependencies

    public java.util.Set transitivelyResolvePomDependencies(org.apache.maven.project.MavenProjectBuilder projectBuilder,
                                                            java.lang.String groupId,
                                                            java.lang.String artifactId,
                                                            java.lang.String versionId,
                                                            boolean resolveProjectArtifact)
                                                     throws java.net.MalformedURLException,
                                                            org.apache.maven.project.ProjectBuildingException,
                                                            org.apache.maven.project.artifact.InvalidDependencyVersionException,
                                                            org.apache.maven.artifact.resolver.ArtifactResolutionException,
                                                            org.apache.maven.artifact.resolver.ArtifactNotFoundException

  Download (if necessary) a pom, and load it as a MavenProject, transitively resolving any dependencies therein.

  Parameters:
    `projectBuilder` -
    `groupId` -
    `artifactId` -
    `versionId` -
  Returns:
    a Set of Artifacts representing the transitively resolved dependencies.
  Throws:
    `java.net.MalformedURLException`
    `org.apache.maven.project.ProjectBuildingException`
    `org.apache.maven.project.artifact.InvalidDependencyVersionException`
    `org.apache.maven.artifact.resolver.ArtifactResolutionException`
    `org.apache.maven.artifact.resolver.ArtifactNotFoundException`

### loadPomAsProject

    public org.apache.maven.project.MavenProject loadPomAsProject(org.apache.maven.project.MavenProjectBuilder projectBuilder,
                                                                  org.apache.maven.artifact.Artifact pomArtifact)
                                                           throws org.apache.maven.project.ProjectBuildingException

  Throws:
    `org.apache.maven.project.ProjectBuildingException`

### getArtifact

    public org.apache.maven.artifact.Artifact getArtifact(java.lang.String groupId,
                                                          java.lang.String artifactId,
                                                          java.lang.String versionId,
                                                          java.lang.String type)

### getPomArtifact

    public org.apache.maven.artifact.Artifact getPomArtifact(java.lang.String groupId,
                                                             java.lang.String artifactId,
                                                             java.lang.String versionId)

### removeDependency

    public void removeDependency(java.util.Set artifacts,
                                 java.lang.String groupId,
                                 java.lang.String artifactId,
                                 java.lang.String versionId,
                                 java.lang.String type)

### addDependency

    public void addDependency(java.util.Set artifacts,
                              java.lang.String groupId,
                              java.lang.String artifactId,
                              java.lang.String versionId,
                              java.lang.String type)
                       throws org.apache.maven.artifact.resolver.ArtifactResolutionException,
                              org.apache.maven.artifact.resolver.ArtifactNotFoundException

  Throws:
    `org.apache.maven.artifact.resolver.ArtifactResolutionException`
    `org.apache.maven.artifact.resolver.ArtifactNotFoundException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 1995-2010 Mort Bay Consulting. All Rights Reserved.