final org.eclipse.aether.artifact.Artifact artifact = ((ArtifactDescriptorException) depedencyResolutionException).getResult().getArtifact(); if (!artifact.equals(lastArtifact)) { tryRemoveLocalArtifact(artifact);
when(projectBuildingResult.getDependencyResolutionResult()).thenReturn(drr); when(drr.getCollectionErrors()).thenReturn(list); when(exception.getResult()).thenReturn(result);