@Override public void resolveArtifacts(ConfigurationInternal configuration, ResolverResults results) throws ResolveException { try { delegate.resolveArtifacts(configuration, results); } catch (Throwable e) { BrokenResolvedConfiguration broken = new BrokenResolvedConfiguration(e, configuration); results.artifactsResolved(broken, broken); return; } ResolvedConfiguration wrappedConfiguration = new ErrorHandlingResolvedConfiguration(results.getResolvedConfiguration(), configuration); results.artifactsResolved(wrappedConfiguration, results.getVisitedArtifacts()); }
public ErrorHandlingResolvedConfiguration(ResolvedConfiguration resolvedConfiguration, ConfigurationInternal configuration) { this.resolvedConfiguration = resolvedConfiguration; this.configuration = configuration; }
public ResolvedConfiguration getResolvedConfiguration() { resolveToStateOrLater(ARTIFACTS_RESOLVED); return cachedResolverResults.getResolvedConfiguration(); }
@Override public ResolvedConfiguration getResolvedConfiguration() { assertHasArtifactResult(); return resolvedConfiguration; }
@Override public void artifactsResolved(ResolvedConfiguration resolvedConfiguration, VisitedArtifactSet visitedArtifacts) { this.resolvedConfiguration = resolvedConfiguration; this.visitedArtifacts = visitedArtifacts; this.artifactResolveState = null; }
public ResolvedConfiguration getResolvedConfiguration() { assertHasResult(); return resolvedConfiguration; }
public void withResolvedConfiguration(ResolvedConfiguration resolvedConfiguration) { this.resolvedConfiguration = resolvedConfiguration; }
public void resolved(ResolvedConfiguration resolvedConfiguration, ResolutionResult resolutionResult) { this.resolvedConfiguration = resolvedConfiguration; this.resolutionResult = resolutionResult; this.fatalFailure = null; }
public void failed(ResolvedConfiguration resolvedConfiguration, ResolveException failure) { this.resolvedConfiguration = resolvedConfiguration; this.resolutionResult = null; this.fatalFailure = failure; }
/** * Returns the old model, slowly being replaced by the new model represented by {@link ResolutionResult}. Requires artifacts to be resolved. */ ResolvedConfiguration getResolvedConfiguration();
/** * Marks artifact resolution as successful, clearing state provided by {@link #retainState(Object)}. */ void artifactsResolved(ResolvedConfiguration resolvedConfiguration, VisitedArtifactSet visitedArtifacts);