if ( result != null && result.getDependencyResolutionResult() != null && !result.getDependencyResolutionResult().getCollectionErrors().isEmpty() ) { Exception depedencyResolutionException = result.getDependencyResolutionResult().getCollectionErrors().get( 0 ); if ( depedencyResolutionException != null ) { throw new MavenEmbedderException( depedencyResolutionException.getMessage(), depedencyResolutionException );
if (result != null && result.getDependencyResolutionResult() != null && !result.getDependencyResolutionResult().getCollectionErrors().isEmpty()) { final Exception depedencyResolutionException = result.getDependencyResolutionResult().getCollectionErrors().get(0); if (depedencyResolutionException instanceof ArtifactDescriptorException) { final org.eclipse.aether.artifact.Artifact artifact = ((ArtifactDescriptorException) depedencyResolutionException).getResult().getArtifact();
when(projectBuildingResult.getDependencyResolutionResult()).thenReturn(drr); when(projectBuildingResult.getDependencyResolutionResult()).thenReturn(drr); when(drr.getCollectionErrors()).thenReturn(list); when(exception.getResult()).thenReturn(result);
problems = result.getDependencyResolutionResult().getCollectionErrors(); if (problems != null && !problems.isEmpty()) { throw new RepositoryException("collection errors: " + problems.toString(), problems.get(0));