Search in sources :

Example 6 with Repository

use of org.apache.maven.plugins.assembly.model.Repository in project maven-plugins by apache.

the class DefaultDependencyResolver method updateRepositoryResolutionRequirements.

void updateRepositoryResolutionRequirements(final Assembly assembly, final ResolutionManagementInfo requirements) {
    final List<Repository> repositories = assembly.getRepositories();
    Set<String> rootScopes = new HashSet<String>();
    if (repositories != null && !repositories.isEmpty()) {
        requirements.setResolutionRequired(true);
        for (final Repository repo : repositories) {
            rootScopes.add(repo.getScope());
        }
    }
    requirements.setScopeFilter(FilterUtils.newScopeFilter(rootScopes));
}
Also used : ArtifactRepository(org.apache.maven.artifact.repository.ArtifactRepository) Repository(org.apache.maven.plugins.assembly.model.Repository) HashSet(java.util.HashSet) LinkedHashSet(java.util.LinkedHashSet)

Aggregations

Repository (org.apache.maven.plugins.assembly.model.Repository)6 ArtifactRepository (org.apache.maven.artifact.repository.ArtifactRepository)3 Assembly (org.apache.maven.plugins.assembly.model.Assembly)3 File (java.io.File)2 MavenProject (org.apache.maven.project.MavenProject)2 ArrayList (java.util.ArrayList)1 HashSet (java.util.HashSet)1 LinkedHashSet (java.util.LinkedHashSet)1 Model (org.apache.maven.model.Model)1 StubArtifactRepository (org.apache.maven.plugin.testing.stubs.StubArtifactRepository)1 ArchiveCreationException (org.apache.maven.plugins.assembly.archive.ArchiveCreationException)1 AddDirectoryTask (org.apache.maven.plugins.assembly.archive.task.AddDirectoryTask)1 Component (org.apache.maven.plugins.assembly.model.Component)1 ContainerDescriptorHandlerConfig (org.apache.maven.plugins.assembly.model.ContainerDescriptorHandlerConfig)1 DependencySet (org.apache.maven.plugins.assembly.model.DependencySet)1 FileItem (org.apache.maven.plugins.assembly.model.FileItem)1 FileSet (org.apache.maven.plugins.assembly.model.FileSet)1 ModuleSet (org.apache.maven.plugins.assembly.model.ModuleSet)1 RepositoryAssemblyException (org.apache.maven.plugins.assembly.repository.RepositoryAssemblyException)1 ConsoleLogger (org.codehaus.plexus.logging.console.ConsoleLogger)1