## org.mortbay.jetty.plugin
Class RuntimeDependencyResolver

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

    public class RuntimeDependencyResolver

extends 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, List remoteRepositories)`

Method Summary
`void` `addDependency(Set artifacts, String groupId, String artifactId, String versionId, String type)`
`org.apache.maven.artifact.Artifact` `getArtifact(String groupId, String artifactId, String versionId, String type)`
`org.apache.maven.artifact.Artifact` `getPomArtifact(String groupId, String artifactId, String versionId)`
`org.apache.maven.project.MavenProject` `loadPomAsProject(org.apache.maven.project.MavenProjectBuilder projectBuilder, org.apache.maven.artifact.Artifact pomArtifact)`
`void` `removeDependency(Set artifacts, String groupId, String artifactId, String versionId, String type)`
`Set` `transitivelyResolvePomDependencies(org.apache.maven.project.MavenProjectBuilder projectBuilder, String groupId, String artifactId, 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,
                                     List remoteRepositories)

Method Detail

### transitivelyResolvePomDependencies

    public Set transitivelyResolvePomDependencies(org.apache.maven.project.MavenProjectBuilder projectBuilder,
                                                  String groupId,
                                                  String artifactId,
                                                  String versionId,
                                                  boolean resolveProjectArtifact)
                                           throws 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:
    `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(String groupId,
                                                          String artifactId,
                                                          String versionId,
                                                          String type)

### getPomArtifact

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

### removeDependency

    public void removeDependency(Set artifacts,
                                 String groupId,
                                 String artifactId,
                                 String versionId,
                                 String type)

### addDependency

    public void addDependency(Set artifacts,
                              String groupId,
                              String artifactId,
                              String versionId,
                              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`

Copyright © 2007 Mort Bay Consulting. All Rights Reserved.