public void applyTo( DefaultDependencyNode child ) { child.setManagedBits( managedBits ); if ( premanagedState ) { child.setData( DependencyManagerUtils.NODE_DATA_PREMANAGED_VERSION, premanagedVersion ); child.setData( DependencyManagerUtils.NODE_DATA_PREMANAGED_SCOPE, premanagedScope ); child.setData( DependencyManagerUtils.NODE_DATA_PREMANAGED_OPTIONAL, premanagedOptional ); child.setData( DependencyManagerUtils.NODE_DATA_PREMANAGED_EXCLUSIONS, premanagedExclusions ); child.setData( DependencyManagerUtils.NODE_DATA_PREMANAGED_PROPERTIES, premanagedProperties ); } }
public void applyTo( DefaultDependencyNode child ) { child.setManagedBits( managedBits ); if ( premanagedState ) { child.setData( DependencyManagerUtils.NODE_DATA_PREMANAGED_VERSION, premanagedVersion ); child.setData( DependencyManagerUtils.NODE_DATA_PREMANAGED_SCOPE, premanagedScope ); child.setData( DependencyManagerUtils.NODE_DATA_PREMANAGED_OPTIONAL, premanagedOptional ); } } }
private static DependencyNode createConflict(Artifact artifact, String winningVersion) { org.eclipse.aether.artifact.DefaultArtifact aetherArtifact = new org.eclipse.aether.artifact.DefaultArtifact(artifact.getGroupId(), artifact.getArtifactId(), artifact.getClassifier(), artifact.getType(), artifact.getVersion()); org.eclipse.aether.artifact.DefaultArtifact winnerArtifact = new org.eclipse.aether.artifact.DefaultArtifact(artifact.getGroupId(), artifact.getArtifactId(), artifact.getClassifier(), artifact.getType(), winningVersion); DefaultDependencyNode dependencyNode = new DefaultDependencyNode(new Dependency(aetherArtifact, artifact.getScope())); dependencyNode.setData(NODE_DATA_WINNER, new DefaultDependencyNode(new Dependency(winnerArtifact, "compile"))); return new DependencyNode(dependencyNode); }
/** * Creates a mostly shallow clone of the specified node. The new node has its own copy of any custom data and * initially no children. * * @param node The node to copy, must not be {@code null}. */ public DefaultDependencyNode( DependencyNode node ) { dependency = node.getDependency(); artifact = node.getArtifact(); children = new ArrayList<DependencyNode>( 0 ); setAliases( node.getAliases() ); setRequestContext( node.getRequestContext() ); setManagedBits( node.getManagedBits() ); setRelocations( node.getRelocations() ); setRepositories( node.getRepositories() ); setVersion( node.getVersion() ); setVersionConstraint( node.getVersionConstraint() ); Map<?, ?> data = node.getData(); setData( data.isEmpty() ? null : new HashMap<Object, Object>( data ) ); }
/** * Creates a mostly shallow clone of the specified node. The new node has its own copy of any custom data and * initially no children. * * @param node The node to copy, must not be {@code null}. */ public DefaultDependencyNode( DependencyNode node ) { dependency = node.getDependency(); artifact = node.getArtifact(); children = new ArrayList<DependencyNode>( 0 ); setAliases( node.getAliases() ); setRequestContext( node.getRequestContext() ); setManagedBits( node.getManagedBits() ); setRelocations( node.getRelocations() ); setRepositories( node.getRepositories() ); setVersion( node.getVersion() ); setVersionConstraint( node.getVersionConstraint() ); Map<?, ?> data = node.getData(); setData( data.isEmpty() ? null : new HashMap<Object, Object>( data ) ); }