/** * {@inheritDoc} */ public void testArtifact( Artifact artifact ) { log( "testArtifact: artifact=" + artifact ); }
/** * {@inheritDoc} */ public void restrictRange( Artifact artifact, Artifact replacement, VersionRange versionRange ) { log( "restrictRange: artifact=" + artifact + ", replacement=" + replacement + ", versionRange=" + versionRange ); // TODO: track range restriction in node (MNG-3093) }
/** * {@inheritDoc} */ public void restrictRange( Artifact artifact, Artifact replacement, VersionRange versionRange ) { log( "restrictRange: artifact=" + artifact + ", replacement=" + replacement + ", versionRange=" + versionRange ); // TODO: track range restriction in node (MNG-3093) }
/** * {@inheritDoc} */ public void testArtifact( Artifact artifact ) { log( "testArtifact: artifact=" + artifact ); }
/** * {@inheritDoc} */ public void endProcessChildren( Artifact artifact ) { DependencyNode node = parentNodes.pop(); log( "endProcessChildren: artifact=" + artifact ); if ( node == null ) { throw new IllegalStateException( "Parent dependency node was null" ); } if ( !node.getArtifact().equals( artifact ) ) { throw new IllegalStateException( "Parent dependency node artifact was expected to be " + node.getArtifact() + " but was " + artifact ); } }
/** * {@inheritDoc} */ public void startProcessChildren( Artifact artifact ) { log( "startProcessChildren: artifact=" + artifact ); if ( !currentNode.getArtifact().equals( artifact ) ) { throw new IllegalStateException( "Artifact was expected to be " + currentNode.getArtifact() + " but was " + artifact ); } parentNodes.push( currentNode ); }
/** * {@inheritDoc} */ public void startProcessChildren( Artifact artifact ) { log( "startProcessChildren: artifact=" + artifact ); if ( !currentNode.getArtifact().equals( artifact ) ) { throw new IllegalStateException( "Artifact was expected to be " + currentNode.getArtifact() + " but was " + artifact ); } parentNodes.push( currentNode ); }
/** * {@inheritDoc} */ public void endProcessChildren( Artifact artifact ) { DependencyNode node = ( DependencyNode ) parentNodes.pop(); log( "endProcessChildren: artifact=" + artifact ); if ( node == null ) { throw new IllegalStateException( "Parent dependency node was null" ); } if ( !node.getArtifact().equals( artifact ) ) { throw new IllegalStateException( "Parent dependency node artifact was expected to be " + node.getArtifact() + " but was " + artifact ); } }
/** * {@inheritDoc} */ public void manageArtifactVersion( Artifact artifact, Artifact replacement ) { log( "manageArtifactVersion: artifact=" + artifact + ", replacement=" + replacement ); /* * DefaultArtifactCollector calls manageArtifact twice: first with the change; then subsequently with no change. * We ignore the second call when the versions are equal. */ if ( isCurrentNodeIncluded() && !replacement.getVersion().equals( artifact.getVersion() ) ) { /* * Cache management information and apply in includeArtifact, since DefaultArtifactCollector mutates the * artifact and then calls includeArtifact after manageArtifact. */ managedVersions.put( getRangeId( replacement ), artifact.getVersion() ); } }
/** * {@inheritDoc} */ public void manageArtifact( Artifact artifact, Artifact replacement ) { // TODO: remove when ResolutionListenerForDepMgmt merged into ResolutionListener log( "manageArtifact: artifact=" + artifact + ", replacement=" + replacement ); if ( replacement.getVersion() != null ) { manageArtifactVersion( artifact, replacement ); } if ( replacement.getScope() != null ) { manageArtifactScope( artifact, replacement ); } }
/** * {@inheritDoc} */ public void manageArtifact( Artifact artifact, Artifact replacement ) { // TODO: remove when ResolutionListenerForDepMgmt merged into ResolutionListener log( "manageArtifact: artifact=" + artifact + ", replacement=" + replacement ); if ( replacement.getVersion() != null ) { manageArtifactVersion( artifact, replacement ); } if ( replacement.getScope() != null ) { manageArtifactScope( artifact, replacement ); } }
/** * {@inheritDoc} */ public void omitForCycle( Artifact artifact ) { log( "omitForCycle: artifact=" + artifact ); if ( isCurrentNodeIncluded() ) { DependencyNode node = createNode( artifact ); node.omitForCycle(); } }
/** * {@inheritDoc} */ public void omitForCycle( Artifact artifact ) { log( "omitForCycle: artifact=" + artifact ); if ( isCurrentNodeIncluded() ) { DependencyNode node = createNode( artifact ); node.omitForCycle(); } }
/** * {@inheritDoc} */ public void updateScopeCurrentPom( Artifact artifact, String scopeIgnored ) { log( "updateScopeCurrentPom: artifact=" + artifact + ", scopeIgnored=" + scopeIgnored ); DependencyNode node = getNode( artifact ); if ( node == null ) { // updateScopeCurrentPom events can be received prior to includeArtifact events node = addNode( artifact ); // TODO remove the node that tried to impose its scope and add some info } node.setFailedUpdateScope( scopeIgnored ); }
/** * {@inheritDoc} */ public void updateScopeCurrentPom( Artifact artifact, String scopeIgnored ) { log( "updateScopeCurrentPom: artifact=" + artifact + ", scopeIgnored=" + scopeIgnored ); DependencyNode node = getNode( artifact ); if ( node == null ) { // updateScopeCurrentPom events can be received prior to includeArtifact events node = addNode( artifact ); // TODO remove the node that tried to impose its scope and add some info } node.setFailedUpdateScope( scopeIgnored ); }
/** * {@inheritDoc} */ public void manageArtifactScope( Artifact artifact, Artifact replacement ) { log( "manageArtifactScope: artifact=" + artifact + ", replacement=" + replacement ); /* * DefaultArtifactCollector calls manageArtifact twice: first with the change; then subsequently with no change. * We ignore the second call when the scopes are equal. */ if ( isCurrentNodeIncluded() && !replacement.getScope().equals( artifact.getScope() ) ) { /* * Cache management information and apply in includeArtifact, since DefaultArtifactCollector mutates the * artifact and then calls includeArtifact after manageArtifact. */ managedScopes.put( getRangeId( replacement ), artifact.getScope() ); } }
/** * {@inheritDoc} */ public void updateScope( Artifact artifact, String scope ) { log( "updateScope: artifact=" + artifact + ", scope=" + scope ); DependencyNode node = getNode( artifact ); if ( node == null ) { // updateScope events can be received prior to includeArtifact events node = addNode( artifact ); } node.setOriginalScope( artifact.getScope() ); }
/** * {@inheritDoc} */ public void updateScope( Artifact artifact, String scope ) { log( "updateScope: artifact=" + artifact + ", scope=" + scope ); DependencyNode node = getNode( artifact ); if ( node == null ) { // updateScope events can be received prior to includeArtifact events node = addNode( artifact ); } node.setOriginalScope( artifact.getScope() ); }
/** * {@inheritDoc} */ public void selectVersionFromRange( Artifact artifact ) { log( "selectVersionFromRange: artifact=" + artifact ); DependencyNode node = getNode( artifact ); /* * selectVersionFromRange is called before includeArtifact */ if ( node == null && isCurrentNodeIncluded() ) { node = addNode( artifact ); } node.setVersionSelectedFromRange( artifact.getVersionRange() ); node.setAvailableVersions( artifact.getAvailableVersions() ); }
/** * {@inheritDoc} */ public void selectVersionFromRange( Artifact artifact ) { log( "selectVersionFromRange: artifact=" + artifact ); DependencyNode node = getNode( artifact ); /* * selectVersionFromRange is called before includeArtifact */ if ( node == null && isCurrentNodeIncluded() ) { node = addNode( artifact ); } node.setVersionSelectedFromRange( artifact.getVersionRange() ); node.setAvailableVersions( artifact.getAvailableVersions() ); }