o Fixed backward-compat

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-3/trunk@831410 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Benjamin Bentmann 2009-10-30 18:13:26 +00:00
parent 02cbed3d5a
commit 59871b0ee7
1 changed files with 4 additions and 16 deletions

View File

@ -25,7 +25,6 @@ import java.util.HashMap;
import java.util.HashSet; import java.util.HashSet;
import java.util.Iterator; import java.util.Iterator;
import java.util.LinkedHashMap; import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Properties; import java.util.Properties;
@ -64,6 +63,8 @@ import org.apache.maven.model.Repository;
import org.apache.maven.model.Resource; import org.apache.maven.model.Resource;
import org.apache.maven.model.Scm; import org.apache.maven.model.Scm;
import org.apache.maven.model.io.xpp3.MavenXpp3Writer; import org.apache.maven.model.io.xpp3.MavenXpp3Writer;
import org.apache.maven.project.artifact.InvalidDependencyVersionException;
import org.apache.maven.project.artifact.MavenMetadataSource;
import org.apache.maven.repository.RepositorySystem; import org.apache.maven.repository.RepositorySystem;
import org.codehaus.plexus.classworlds.realm.ClassRealm; import org.codehaus.plexus.classworlds.realm.ClassRealm;
import org.codehaus.plexus.util.StringUtils; import org.codehaus.plexus.util.StringUtils;
@ -237,22 +238,9 @@ public class MavenProject
//TODO: need to integrate the effective scope and refactor it out of the MMS //TODO: need to integrate the effective scope and refactor it out of the MMS
@Deprecated @Deprecated
public Set<Artifact> createArtifacts( ArtifactFactory artifactFactory, String inheritedScope, ArtifactFilter filter ) public Set<Artifact> createArtifacts( ArtifactFactory artifactFactory, String inheritedScope, ArtifactFilter filter )
throws InvalidDependencyVersionException
{ {
Set<Artifact> artifacts = new LinkedHashSet<Artifact>(); return MavenMetadataSource.createArtifacts( artifactFactory, getDependencies(), inheritedScope, filter, this );
for ( Dependency d : getDependencies() )
{
Artifact dependencyArtifact =
repositorySystem.createArtifact( d.getGroupId(), d.getArtifactId(), d.getVersion(), d.getScope(),
d.getType() );
if ( filter == null || filter.include( dependencyArtifact ) )
{
artifacts.add( dependencyArtifact );
}
}
return artifacts;
} }
// TODO: Find a way to use <relativePath/> here...it's tricky, because the moduleProject // TODO: Find a way to use <relativePath/> here...it's tricky, because the moduleProject