o need to implement this method used by the assembly plugin

git-svn-id: https://svn.apache.org/repos/asf/maven/components/branches/MNG-2766@773684 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jason van Zyl 2009-05-11 20:50:05 +00:00
parent b8c6c01864
commit 0128936e7e
1 changed files with 21 additions and 1 deletions

View File

@ -118,6 +118,24 @@ public ResolutionGroup retrieve( Artifact artifact, ArtifactRepository localRepo
return new ResolutionGroup( pomArtifact, artifacts, remoteRepositories );
}
private Set<Artifact> createArtifacts( List<Dependency> dependencies )
{
Set<Artifact> artifacts = new LinkedHashSet<Artifact>();
for ( Dependency d : dependencies )
{
String effectiveScope = getEffectiveScope( d.getScope(), artifact.getScope() );
if ( effectiveScope != null )
{
Artifact dependencyArtifact = repositorySystem.createArtifact( d.getGroupId(), d.getArtifactId(), d.getVersion(), effectiveScope, d.getType() );
artifacts.add( dependencyArtifact );
}
}
}
private String getEffectiveScope( String originalScope, String inheritedScope )
{
String effectiveScope = Artifact.SCOPE_RUNTIME;
@ -215,6 +233,7 @@ private List<ArtifactVersion> retrieveAvailableVersionsFromMetadata( Metadata re
return versions;
}
/*
// USED BY MAVEN ASSEMBLY PLUGIN
@Deprecated
public static Set<Artifact> createArtifacts( ArtifactFactory artifactFactory, List<Dependency> dependencies, String inheritedScope, ArtifactFilter dependencyFilter, MavenProject project )
@ -228,5 +247,6 @@ public static Set<Artifact> createArtifacts( ArtifactFactory artifactFactory, Li
{
throw new InvalidDependencyVersionException( e.getProjectId(), e.getDependency(), e.getPomFile, e.getCauseException() );
}
}
}
*/
}