public static Map<ProjectRef, ProjectRefCollection> collectProjectReferences( final Map<ProjectVersionRef, Map<ArtifactRef, ConcreteResource>> refMap ) { final Map<ProjectRef, ProjectRefCollection> projects = new HashMap<>(); for ( final Map.Entry<ProjectVersionRef, Map<ArtifactRef, ConcreteResource>> projectEntry : refMap.entrySet() ) { final ProjectVersionRef pvr = projectEntry.getKey(); final ProjectRef r = pvr.asProjectRef(); ProjectRefCollection prc = projects.get( r ); if ( prc == null ) { prc = new ProjectRefCollection(); projects.put( r, prc ); } prc.addVersionRef( pvr ); prc.addArtifactRef( pvr.asPomArtifact() ); for ( final ArtifactRef ar : projectEntry.getValue() .keySet() ) { prc.addArtifactRef( ar ); } } return projects; }
public RepoContentCollector( final ProjectVersionRef ref, final ProjectRefCollection refs, final RepositoryContentRequest recipe, final Location location, final DiscoveryConfig discoveryConfig, final ArtifactManager artifacts, final ProjectRelationshipDiscoverer discoverer, final Set<Location> excluded, final int projectCounter, final int projectSz ) { this.ref = ref; this.refs = refs.getArtifactRefs(); this.recipe = recipe; this.location = location; this.discoveryConfig = discoveryConfig; this.artifacts = artifacts; this.discoverer = discoverer; this.excluded = excluded; this.projectCounter = projectCounter; this.projectSz = projectSz; this.counter = 0; this.artifactSz = refs.getArtifactRefs() .size(); }
public static Map<ProjectVersionRef, ProjectRefCollection> collectProjectVersionReferences( final RelationshipGraph graph ) { final Collection<ProjectRelationship<?, ?>> rels = graph.getAllRelationships(); final Map<ProjectVersionRef, ProjectRefCollection> result = collectProjectVersionReferences( rels ); for ( final ProjectVersionRef root : graph.getParams() .getRoots() ) { ProjectRefCollection collection = result.get( root ); if ( collection == null ) { collection = new ProjectRefCollection(); result.put( root, collection ); } collection.addArtifactRef( root.asPomArtifact() ); } return result; }
final VersionSpec spec = generateVersionSpec( prc.getVersionRefs(), recipe.isGenerateVersionRanges() ); final Set<VersionlessArtifactRef> arts = prc.getVersionlessArtifactRefs(); if ( arts == null )
public void addArtifactRef( final ArtifactRef ref ) { addVersionRef( ref.asProjectVersionRef() ); artifactRefs.add( ref ); }
public static Map<ProjectVersionRef, ProjectRefCollection> collectProjectVersionReferences( final RelationshipGraph graph ) { final Collection<ProjectRelationship<?, ?>> rels = graph.getAllRelationships(); final Map<ProjectVersionRef, ProjectRefCollection> result = collectProjectVersionReferences( rels ); for ( final ProjectVersionRef root : graph.getParams() .getRoots() ) { ProjectRefCollection collection = result.get( root ); if ( collection == null ) { collection = new ProjectRefCollection(); result.put( root, collection ); } collection.addArtifactRef( root.asPomArtifact() ); } return result; }
final VersionSpec spec = generateVersionSpec( prc.getVersionRefs(), recipe.isGenerateVersionRanges() ); final Set<VersionlessArtifactRef> arts = prc.getVersionlessArtifactRefs(); if ( arts == null )
public void addArtifactRef( final ArtifactRef ref ) { addVersionRef( ref.asProjectVersionRef() ); artifactRefs.add( ref ); }
public static Map<ProjectRef, ProjectRefCollection> collectProjectReferences( final Map<ProjectVersionRef, Map<ArtifactRef, ConcreteResource>> refMap ) { final Map<ProjectRef, ProjectRefCollection> projects = new HashMap<>(); for ( final Map.Entry<ProjectVersionRef, Map<ArtifactRef, ConcreteResource>> projectEntry : refMap.entrySet() ) { final ProjectVersionRef pvr = projectEntry.getKey(); final ProjectRef r = pvr.asProjectRef(); ProjectRefCollection prc = projects.get( r ); if ( prc == null ) { prc = new ProjectRefCollection(); projects.put( r, prc ); } prc.addVersionRef( pvr ); prc.addArtifactRef( pvr.asPomArtifact() ); for ( final ArtifactRef ar : projectEntry.getValue() .keySet() ) { prc.addArtifactRef( ar ); } } return projects; }
public RepoContentCollector( final ProjectVersionRef ref, final ProjectRefCollection refs, final RepositoryContentRequest recipe, final Location location, final DiscoveryConfig discoveryConfig, final ArtifactManager artifacts, final ProjectRelationshipDiscoverer discoverer, final Set<Location> excluded, final int projectCounter, final int projectSz ) { this.ref = ref; this.refs = refs.getArtifactRefs(); this.recipe = recipe; this.location = location; this.discoveryConfig = discoveryConfig; this.artifacts = artifacts; this.discoverer = discoverer; this.excluded = excluded; this.projectCounter = projectCounter; this.projectSz = projectSz; this.counter = 0; this.artifactSz = refs.getArtifactRefs() .size(); }
if ( prc == null ) prc = new ProjectRefCollection(); projects.put( pvr, prc ); prc.addVersionRef( pvr ); prc.addArtifactRef( pvr.asPomArtifact() ); if ( tprc == null ) tprc = new ProjectRefCollection(); projects.put( tr, tprc ); tprc.addArtifactRef( tar );
if ( prc == null ) prc = new ProjectRefCollection(); projects.put( pvr, prc ); prc.addVersionRef( pvr ); prc.addArtifactRef( pvr.asPomArtifact() ); if ( tprc == null ) tprc = new ProjectRefCollection(); projects.put( tr, tprc ); tprc.addArtifactRef( tar );
if ( prc == null ) prc = new ProjectRefCollection(); projects.put( r, prc ); prc.addVersionRef( pvr ); prc.addArtifactRef( pvr.asPomArtifact() ); if ( tprc == null ) tprc = new ProjectRefCollection(); projects.put( tr, tprc ); tprc.addArtifactRef( tar );
if ( prc == null ) prc = new ProjectRefCollection(); projects.put( r, prc ); prc.addVersionRef( pvr ); prc.addArtifactRef( pvr.asPomArtifact() ); if ( tprc == null ) tprc = new ProjectRefCollection(); projects.put( tr, tprc ); tprc.addArtifactRef( tar );
if ( refCollection == null ) refCollection = new ProjectRefCollection(); refCollection.addVersionRef( root ); refCollection.addArtifactRef( (ArtifactRef) root );
if ( refCollection == null ) refCollection = new ProjectRefCollection(); refCollection.addVersionRef( root ); refCollection.addArtifactRef( (ArtifactRef) root );