mirror of https://github.com/apache/maven.git
o Restored backward-compat with maven-assembly-plugin
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@749999 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
9b6716c552
commit
688573f8ec
|
@ -36,9 +36,11 @@ import org.apache.maven.artifact.repository.metadata.Metadata;
|
||||||
import org.apache.maven.artifact.repository.metadata.RepositoryMetadata;
|
import org.apache.maven.artifact.repository.metadata.RepositoryMetadata;
|
||||||
import org.apache.maven.artifact.repository.metadata.RepositoryMetadataManager;
|
import org.apache.maven.artifact.repository.metadata.RepositoryMetadataManager;
|
||||||
import org.apache.maven.artifact.repository.metadata.RepositoryMetadataResolutionException;
|
import org.apache.maven.artifact.repository.metadata.RepositoryMetadataResolutionException;
|
||||||
|
import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
|
||||||
import org.apache.maven.artifact.versioning.ArtifactVersion;
|
import org.apache.maven.artifact.versioning.ArtifactVersion;
|
||||||
import org.apache.maven.artifact.versioning.DefaultArtifactVersion;
|
import org.apache.maven.artifact.versioning.DefaultArtifactVersion;
|
||||||
import org.apache.maven.artifact.versioning.VersionRange;
|
import org.apache.maven.artifact.versioning.VersionRange;
|
||||||
|
import org.apache.maven.model.Dependency;
|
||||||
import org.apache.maven.model.DistributionManagement;
|
import org.apache.maven.model.DistributionManagement;
|
||||||
import org.apache.maven.model.Relocation;
|
import org.apache.maven.model.Relocation;
|
||||||
import org.apache.maven.project.DefaultProjectBuilderConfiguration;
|
import org.apache.maven.project.DefaultProjectBuilderConfiguration;
|
||||||
|
@ -47,6 +49,8 @@ import org.apache.maven.project.MavenProject;
|
||||||
import org.apache.maven.project.MavenProjectBuilder;
|
import org.apache.maven.project.MavenProjectBuilder;
|
||||||
import org.apache.maven.project.ProjectBuildingException;
|
import org.apache.maven.project.ProjectBuildingException;
|
||||||
import org.apache.maven.project.validation.ModelValidationResult;
|
import org.apache.maven.project.validation.ModelValidationResult;
|
||||||
|
import org.apache.maven.repository.LegacyMavenRepositorySystem;
|
||||||
|
import org.apache.maven.repository.VersionNotFoundException;
|
||||||
import org.codehaus.plexus.PlexusContainer;
|
import org.codehaus.plexus.PlexusContainer;
|
||||||
import org.codehaus.plexus.component.annotations.Component;
|
import org.codehaus.plexus.component.annotations.Component;
|
||||||
import org.codehaus.plexus.component.annotations.Requirement;
|
import org.codehaus.plexus.component.annotations.Requirement;
|
||||||
|
@ -504,4 +508,23 @@ public class MavenMetadataSource
|
||||||
private Artifact pomArtifact;
|
private Artifact pomArtifact;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// USED BY MAVEN ASSEMBLY PLUGIN
|
||||||
|
@Deprecated
|
||||||
|
public static Set<Artifact> createArtifacts( ArtifactFactory artifactFactory, List<Dependency> dependencies,
|
||||||
|
String inheritedScope, ArtifactFilter dependencyFilter,
|
||||||
|
MavenProject project )
|
||||||
|
throws InvalidDependencyVersionException
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
return LegacyMavenRepositorySystem.createArtifacts( artifactFactory, dependencies, inheritedScope,
|
||||||
|
dependencyFilter, project );
|
||||||
|
}
|
||||||
|
catch ( VersionNotFoundException e )
|
||||||
|
{
|
||||||
|
throw new InvalidDependencyVersionException( e.getProjectId(), e.getDependency(), e.getPomFile(),
|
||||||
|
e.getCauseException() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -191,7 +191,15 @@ public class LegacyMavenRepositorySystem
|
||||||
* @return {@link Set} < {@link Artifact} >
|
* @return {@link Set} < {@link Artifact} >
|
||||||
* @todo desperately needs refactoring. It's just here because it's implementation is maven-project specific
|
* @todo desperately needs refactoring. It's just here because it's implementation is maven-project specific
|
||||||
*/
|
*/
|
||||||
public Set<Artifact> createArtifacts( List<Dependency> dependencies, String inheritedScope, ArtifactFilter dependencyFilter, MavenRepositoryWrapper reactor )
|
public Set<Artifact> createArtifacts( List<Dependency> dependencies, String inheritedScope,
|
||||||
|
ArtifactFilter dependencyFilter, MavenRepositoryWrapper reactor )
|
||||||
|
throws VersionNotFoundException
|
||||||
|
{
|
||||||
|
return createArtifacts( artifactFactory, dependencies, inheritedScope, dependencyFilter, reactor );
|
||||||
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
|
public static Set<Artifact> createArtifacts( ArtifactFactory artifactFactory,List<Dependency> dependencies, String inheritedScope, ArtifactFilter dependencyFilter, MavenRepositoryWrapper reactor )
|
||||||
throws VersionNotFoundException
|
throws VersionNotFoundException
|
||||||
{
|
{
|
||||||
Set<Artifact> projectArtifacts = new LinkedHashSet<Artifact>( dependencies.size() );
|
Set<Artifact> projectArtifacts = new LinkedHashSet<Artifact>( dependencies.size() );
|
||||||
|
|
Loading…
Reference in New Issue