DependencyNode winner = (DependencyNode) node.getData().get( ConflictResolver.NODE_DATA_WINNER ); if ( winner != null && !ArtifactIdUtils.equalsId( a, winner.getArtifact() ) )
dependencyRequest.setRoot(node); dependencyRequest.setCollectRequest(collectRequest); dependencyRequest.setFilter((node1, parents) -> !node1.getData().containsKey(ConflictResolver.CONFIG_PROP_VERBOSE) && (dependencyFilter == null || dependencyFilter.accept(node1, parents)));
/** * Gets the optional flag of the specified dependency node before dependency management was applied (if any). * * @param node The dependency node to retrieve the premanaged data for, must not be {@code null}. * @return The node's optional flag before dependency management or {@code null} if the flag was not managed or if * {@link #CONFIG_PROP_VERBOSE} was not enabled. */ public static Boolean getPremanagedOptional( DependencyNode node ) { if ( ( node.getManagedBits() & DependencyNode.MANAGED_OPTIONAL ) == 0 ) { return null; } return cast( node.getData().get( NODE_DATA_PREMANAGED_OPTIONAL ), Boolean.class ); }
/** * Gets the scope of the specified dependency node before dependency management was applied (if any). * * @param node The dependency node to retrieve the premanaged data for, must not be {@code null}. * @return The node's dependency scope before dependency management or {@code null} if the scope was not managed or * if {@link #CONFIG_PROP_VERBOSE} was not enabled. */ public static String getPremanagedScope( DependencyNode node ) { if ( ( node.getManagedBits() & DependencyNode.MANAGED_SCOPE ) == 0 ) { return null; } return cast( node.getData().get( NODE_DATA_PREMANAGED_SCOPE ), String.class ); }
/** * Gets the version or version range of the specified dependency node before dependency management was applied (if * any). * * @param node The dependency node to retrieve the premanaged data for, must not be {@code null}. * @return The node's dependency version before dependency management or {@code null} if the version was not managed * or if {@link #CONFIG_PROP_VERBOSE} was not enabled. */ public static String getPremanagedVersion( DependencyNode node ) { if ( ( node.getManagedBits() & DependencyNode.MANAGED_VERSION ) == 0 ) { return null; } return cast( node.getData().get( NODE_DATA_PREMANAGED_VERSION ), String.class ); }
/** * Gets the scope of the specified dependency node before dependency management was applied (if any). * * @param node The dependency node to retrieve the premanaged data for, must not be {@code null}. * * @return The node's dependency scope before dependency management or {@code null} if the scope was not managed or * if {@link #CONFIG_PROP_VERBOSE} was not enabled. */ public static String getPremanagedScope( DependencyNode node ) { if ( ( node.getManagedBits() & DependencyNode.MANAGED_SCOPE ) == 0 ) { return null; } return cast( node.getData().get( NODE_DATA_PREMANAGED_SCOPE ), String.class ); }
/** * Gets the version or version range of the specified dependency node before dependency management was applied (if * any). * * @param node The dependency node to retrieve the premanaged data for, must not be {@code null}. * * @return The node's dependency version before dependency management or {@code null} if the version was not managed * or if {@link #CONFIG_PROP_VERBOSE} was not enabled. */ public static String getPremanagedVersion( DependencyNode node ) { if ( ( node.getManagedBits() & DependencyNode.MANAGED_VERSION ) == 0 ) { return null; } return cast( node.getData().get( NODE_DATA_PREMANAGED_VERSION ), String.class ); }
/** * Gets the optional flag of the specified dependency node before dependency management was applied (if any). * * @param node The dependency node to retrieve the premanaged data for, must not be {@code null}. * * @return The node's optional flag before dependency management or {@code null} if the flag was not managed or if * {@link #CONFIG_PROP_VERBOSE} was not enabled. */ public static Boolean getPremanagedOptional( DependencyNode node ) { if ( ( node.getManagedBits() & DependencyNode.MANAGED_OPTIONAL ) == 0 ) { return null; } return cast( node.getData().get( NODE_DATA_PREMANAGED_OPTIONAL ), Boolean.class ); }
/** * Gets the {@code Exclusion}s of the specified dependency node before dependency management was applied (if any). * * @param node The dependency node to retrieve the premanaged data for, must not be {@code null}. * * @return The nodes' {@code Exclusion}s before dependency management or {@code null} if exclusions were not managed * or if {@link #CONFIG_PROP_VERBOSE} was not enabled. * * @since 1.1.0 */ @SuppressWarnings( "unchecked" ) public static Collection<Exclusion> getPremanagedExclusions( DependencyNode node ) { if ( ( node.getManagedBits() & DependencyNode.MANAGED_EXCLUSIONS ) == 0 ) { return null; } return cast( node.getData().get( NODE_DATA_PREMANAGED_EXCLUSIONS ), Collection.class ); }
/** * Gets the properties of the specified dependency node before dependency management was applied (if any). * * @param node The dependency node to retrieve the premanaged data for, must not be {@code null}. * * @return The nodes' properties before dependency management or {@code null} if properties were not managed or if * {@link #CONFIG_PROP_VERBOSE} was not enabled. * * @since 1.1.0 */ @SuppressWarnings( "unchecked" ) public static Map<String, String> getPremanagedProperties( DependencyNode node ) { if ( ( node.getManagedBits() & DependencyNode.MANAGED_PROPERTIES ) == 0 ) { return null; } return cast( node.getData().get( NODE_DATA_PREMANAGED_PROPERTIES ), Map.class ); }
private static NodeResolution determineResolution(org.eclipse.aether.graph.DependencyNode dependencyNode) { org.eclipse.aether.graph.DependencyNode winner = (org.eclipse.aether.graph.DependencyNode) dependencyNode.getData().get(ConflictResolver.NODE_DATA_WINNER); if (winner != null) { if (winner.getArtifact().getVersion().equals(dependencyNode.getArtifact().getVersion())) { return OMITTED_FOR_DUPLICATE; } return OMITTED_FOR_CONFLICT; } return INCLUDED; }
private static String determineEffectiveVersion(org.eclipse.aether.graph.DependencyNode dependencyNode) { org.eclipse.aether.graph.DependencyNode winner = (org.eclipse.aether.graph.DependencyNode) dependencyNode.getData().get(ConflictResolver.NODE_DATA_WINNER); if (winner != null) { return winner.getArtifact().getVersion(); } return dependencyNode.getArtifact().getVersion(); } }
DependencyNode winner = (DependencyNode) node.getData().get(ConflictResolver.NODE_DATA_WINNER); if (winner != null && !ArtifactIdUtils.equalsId(a, winner.getArtifact())) { Artifact w = winner.getArtifact();
DependencyNode winner = (DependencyNode) node.getData().get( ConflictResolver.NODE_DATA_WINNER ); if ( winner != null && !ArtifactIdUtils.equalsId( a, winner.getArtifact() ) )
DependencyNode winner = (DependencyNode) node.getData() .get(ConflictResolver.NODE_DATA_WINNER); if (winner != null && !ArtifactIdUtils.equalsId(a, winner.getArtifact())) {
if ( node.getData().get( NODE_DATA_WINNER ) != null )
if ( node.getData().get( NODE_DATA_WINNER ) != null )
/** * 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 ) ); }