Search in sources :

Example 1 with AssemblyId

use of org.apache.maven.plugins.assembly.resolved.AssemblyId in project maven-plugins by apache.

the class DefaultDependencyResolver method resolveDependencySets.

@Override
public Map<DependencySet, Set<Artifact>> resolveDependencySets(final Assembly assembly, ModuleSet moduleSet, final AssemblerConfigurationSource configSource, List<DependencySet> dependencySets) throws DependencyResolutionException {
    Map<DependencySet, Set<Artifact>> result = new LinkedHashMap<DependencySet, Set<Artifact>>();
    for (DependencySet dependencySet : dependencySets) {
        final MavenProject currentProject = configSource.getProject();
        final ResolutionManagementInfo info = new ResolutionManagementInfo(currentProject);
        updateRepositoryResolutionRequirements(assembly, info);
        final AssemblyId assemblyId = AssemblyId.createAssemblyId(assembly);
        updateDependencySetResolutionRequirements(dependencySet, info, assemblyId, configSource.getMavenSession().getProjectBuildingRequest(), currentProject);
        updateModuleSetResolutionRequirements(assemblyId, moduleSet, dependencySet, info, configSource);
        resolve(assembly, configSource, result, dependencySet, info);
    }
    return result;
}
Also used : ModuleSet(org.apache.maven.plugins.assembly.model.ModuleSet) HashSet(java.util.HashSet) LinkedHashSet(java.util.LinkedHashSet) Set(java.util.Set) DependencySet(org.apache.maven.plugins.assembly.model.DependencySet) MavenProject(org.apache.maven.project.MavenProject) DependencySet(org.apache.maven.plugins.assembly.model.DependencySet) AssemblyId(org.apache.maven.plugins.assembly.resolved.AssemblyId) Artifact(org.apache.maven.artifact.Artifact) LinkedHashMap(java.util.LinkedHashMap)

Example 2 with AssemblyId

use of org.apache.maven.plugins.assembly.resolved.AssemblyId in project maven-plugins by apache.

the class DefaultDependencyResolver method resolveDependencySets.

@Override
public Map<DependencySet, Set<Artifact>> resolveDependencySets(final Assembly assembly, final AssemblerConfigurationSource configSource, List<DependencySet> dependencySets) throws DependencyResolutionException {
    Map<DependencySet, Set<Artifact>> result = new LinkedHashMap<DependencySet, Set<Artifact>>();
    for (DependencySet dependencySet : dependencySets) {
        final MavenProject currentProject = configSource.getProject();
        final ResolutionManagementInfo info = new ResolutionManagementInfo(currentProject);
        updateRepositoryResolutionRequirements(assembly, info);
        final AssemblyId assemblyId = AssemblyId.createAssemblyId(assembly);
        updateDependencySetResolutionRequirements(dependencySet, info, assemblyId, configSource.getMavenSession().getProjectBuildingRequest(), currentProject);
        resolve(assembly, configSource, result, dependencySet, info);
    }
    return result;
}
Also used : ModuleSet(org.apache.maven.plugins.assembly.model.ModuleSet) HashSet(java.util.HashSet) LinkedHashSet(java.util.LinkedHashSet) Set(java.util.Set) DependencySet(org.apache.maven.plugins.assembly.model.DependencySet) MavenProject(org.apache.maven.project.MavenProject) DependencySet(org.apache.maven.plugins.assembly.model.DependencySet) AssemblyId(org.apache.maven.plugins.assembly.resolved.AssemblyId) Artifact(org.apache.maven.artifact.Artifact) LinkedHashMap(java.util.LinkedHashMap)

Aggregations

HashSet (java.util.HashSet)2 LinkedHashMap (java.util.LinkedHashMap)2 LinkedHashSet (java.util.LinkedHashSet)2 Set (java.util.Set)2 Artifact (org.apache.maven.artifact.Artifact)2 DependencySet (org.apache.maven.plugins.assembly.model.DependencySet)2 ModuleSet (org.apache.maven.plugins.assembly.model.ModuleSet)2 AssemblyId (org.apache.maven.plugins.assembly.resolved.AssemblyId)2 MavenProject (org.apache.maven.project.MavenProject)2