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 class MavenMetadataSource
return new ResolutionGroup( pomArtifact, artifacts, remoteRepositories ); 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 ) private String getEffectiveScope( String originalScope, String inheritedScope )
{ {
String effectiveScope = Artifact.SCOPE_RUNTIME; String effectiveScope = Artifact.SCOPE_RUNTIME;
@ -215,6 +233,7 @@ public class MavenMetadataSource
return versions; return versions;
} }
/*
// USED BY MAVEN ASSEMBLY PLUGIN // USED BY MAVEN ASSEMBLY PLUGIN
@Deprecated @Deprecated
public static Set<Artifact> createArtifacts( ArtifactFactory artifactFactory, List<Dependency> dependencies, String inheritedScope, ArtifactFilter dependencyFilter, MavenProject project ) public static Set<Artifact> createArtifacts( ArtifactFactory artifactFactory, List<Dependency> dependencies, String inheritedScope, ArtifactFilter dependencyFilter, MavenProject project )
@ -228,5 +247,6 @@ public class MavenMetadataSource
{ {
throw new InvalidDependencyVersionException( e.getProjectId(), e.getDependency(), e.getPomFile, e.getCauseException() ); throw new InvalidDependencyVersionException( e.getProjectId(), e.getDependency(), e.getPomFile, e.getCauseException() );
} }
} }
*/
} }