com.atlassian.maven.plugins.testharness.util
Class DependencyUtils

java.lang.Object
  extended by com.atlassian.maven.plugins.testharness.util.DependencyUtils

public class DependencyUtils
extends java.lang.Object

in charge of finding and perhaps dynamically downloading dependencies


Constructor Summary
DependencyUtils(org.apache.maven.artifact.factory.ArtifactFactory artifactFactory, org.apache.maven.artifact.resolver.ArtifactResolver resolver, org.apache.maven.artifact.repository.ArtifactRepository localRepository, java.util.List remoteRepositories, org.apache.maven.project.MavenProject mavenProject, org.codehaus.cargo.util.AntUtils antUtils)
           
 
Method Summary
 void copyDependenciesTo(java.util.List dependencies, java.io.File location)
          takes a list of dependencies, loads them from the repository, and copies them to location
 void expandDependency(java.lang.String groupId, java.lang.String artifactId, java.lang.String version, java.lang.String type, java.io.File location)
           
 void expandDependency(java.lang.String groupId, java.lang.String artifactId, java.lang.String version, java.lang.String type, java.io.File location, boolean collapse)
           
 void expandDependency(java.lang.String groupId, java.lang.String artifactId, java.lang.String version, java.lang.String type, java.io.File location, java.io.File markerLocation, boolean collapse)
           
 java.io.File findDependency(org.apache.maven.model.Dependency dependency)
          finds an artifact based on the dependency's group id, artifact id, and if it's set type in the project's artifacts
 java.io.File getDependency(org.apache.maven.model.Dependency dependency)
          returns a dependency that does not need to be configured in the project already todo this doesn't do transitive fetching, we need that to make it work
 void handlePluginDependencies(java.util.List dependencies, java.io.File installLocation)
          takes plugin dependencies and installs them to the given location...
 java.util.List loadDependencyList(java.io.InputStream inputStream)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DependencyUtils

public DependencyUtils(org.apache.maven.artifact.factory.ArtifactFactory artifactFactory,
                       org.apache.maven.artifact.resolver.ArtifactResolver resolver,
                       org.apache.maven.artifact.repository.ArtifactRepository localRepository,
                       java.util.List remoteRepositories,
                       org.apache.maven.project.MavenProject mavenProject,
                       org.codehaus.cargo.util.AntUtils antUtils)
Method Detail

getDependency

public java.io.File getDependency(org.apache.maven.model.Dependency dependency)
                           throws java.lang.Exception
returns a dependency that does not need to be configured in the project already todo this doesn't do transitive fetching, we need that to make it work

Parameters:
dependency -
Returns:
Throws:
java.lang.Exception

findDependency

public java.io.File findDependency(org.apache.maven.model.Dependency dependency)
finds an artifact based on the dependency's group id, artifact id, and if it's set type in the project's artifacts

Parameters:
dependency -
Returns:

expandDependency

public void expandDependency(java.lang.String groupId,
                             java.lang.String artifactId,
                             java.lang.String version,
                             java.lang.String type,
                             java.io.File location)

expandDependency

public void expandDependency(java.lang.String groupId,
                             java.lang.String artifactId,
                             java.lang.String version,
                             java.lang.String type,
                             java.io.File location,
                             boolean collapse)

expandDependency

public void expandDependency(java.lang.String groupId,
                             java.lang.String artifactId,
                             java.lang.String version,
                             java.lang.String type,
                             java.io.File location,
                             java.io.File markerLocation,
                             boolean collapse)

loadDependencyList

public java.util.List loadDependencyList(java.io.InputStream inputStream)

copyDependenciesTo

public void copyDependenciesTo(java.util.List dependencies,
                               java.io.File location)
                        throws java.lang.Exception
takes a list of dependencies, loads them from the repository, and copies them to location

Parameters:
dependencies -
location -
Throws:
java.lang.Exception

handlePluginDependencies

public void handlePluginDependencies(java.util.List dependencies,
                                     java.io.File installLocation)
                              throws java.lang.Exception
takes plugin dependencies and installs them to the given location... if the dependency is a file, it gets copied if it is defined by group/artifact/version, it gets it and installs it if it sis defined by group/artifact it tries to find one

Parameters:
dependencies -
installLocation -
Throws:
java.lang.Exception


Copyright © 2008 Atlassian Software Systems Pty Ltd. All Rights Reserved.