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:
Benjamin Bentmann 2009-03-04 13:17:45 +00:00
parent 9b6716c552
commit 688573f8ec
2 changed files with 32 additions and 1 deletions

View File

@ -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() );
}
}
} }

View File

@ -191,7 +191,15 @@ public class LegacyMavenRepositorySystem
* @return {@link Set} &lt; {@link Artifact} > * @return {@link Set} &lt; {@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() );