mirror of https://github.com/apache/maven.git
o restoring a primitive version of the createArtifacts, need to refactor the MMS to make this work correctly.
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@785300 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
cd9056d1fd
commit
88cc8d652b
|
@ -25,6 +25,7 @@ import java.util.Collections;
|
|||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
|
@ -35,7 +36,9 @@ import org.apache.maven.artifact.Artifact;
|
|||
import org.apache.maven.artifact.ArtifactUtils;
|
||||
import org.apache.maven.artifact.DependencyResolutionRequiredException;
|
||||
import org.apache.maven.artifact.InvalidRepositoryException;
|
||||
import org.apache.maven.artifact.factory.ArtifactFactory;
|
||||
import org.apache.maven.artifact.repository.ArtifactRepository;
|
||||
import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
|
||||
import org.apache.maven.artifact.versioning.ManagedVersionMap;
|
||||
import org.apache.maven.model.Build;
|
||||
import org.apache.maven.model.CiManagement;
|
||||
|
@ -156,6 +159,9 @@ public class MavenProject
|
|||
private ProjectBuildingRequest projectBuilderConfiguration;
|
||||
|
||||
private RepositorySystem repositorySystem;
|
||||
|
||||
private File parentFile;
|
||||
|
||||
//
|
||||
|
||||
public MavenProject()
|
||||
|
@ -190,8 +196,6 @@ public class MavenProject
|
|||
setModel( model );
|
||||
}
|
||||
|
||||
private File parentFile;
|
||||
|
||||
public File getParentFile()
|
||||
{
|
||||
return parentFile;
|
||||
|
@ -237,6 +241,25 @@ public class MavenProject
|
|||
pluginArtifactRepositories = createArtifactRepositories( model.getPluginRepositories(), null );
|
||||
}
|
||||
|
||||
//TODO: need to integrate the effective scope and refactor it out of the MMS
|
||||
@Deprecated
|
||||
public Set<Artifact> createArtifacts( ArtifactFactory artifactFactory, String inheritedScope, ArtifactFilter filter )
|
||||
{
|
||||
Set<Artifact> artifacts = new LinkedHashSet<Artifact>();
|
||||
|
||||
for ( Dependency d : getDependencies() )
|
||||
{
|
||||
Artifact dependencyArtifact = repositorySystem.createArtifact( d.getGroupId(), d.getArtifactId(), d.getVersion(), d.getScope(), d.getType() );
|
||||
|
||||
if ( filter.include( dependencyArtifact ) )
|
||||
{
|
||||
artifacts.add( dependencyArtifact );
|
||||
}
|
||||
}
|
||||
|
||||
return artifacts;
|
||||
}
|
||||
|
||||
private List<ArtifactRepository> createArtifactRepositories( List<Repository> pomRepositories,
|
||||
List<ArtifactRepository> externalRepositories )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue