mirror of https://github.com/apache/maven.git
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:
parent
b8c6c01864
commit
0128936e7e
|
@ -118,6 +118,24 @@ public class MavenMetadataSource
|
|||
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 @@ public class MavenMetadataSource
|
|||
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 class MavenMetadataSource
|
|||
{
|
||||
throw new InvalidDependencyVersionException( e.getProjectId(), e.getDependency(), e.getPomFile, e.getCauseException() );
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue