Package org.eclipse.aether.resolution
Class ArtifactResult
java.lang.Object
org.eclipse.aether.resolution.ArtifactResult
The result of an artifact resolution request.
- See Also:
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final ArtifactRepositoryA sentinel object, that is used as key for exceptions that had no related repository during resolution.
- 
Constructor SummaryConstructorsConstructorDescriptionArtifactResult(ArtifactRequest request) Creates a new result for the specified request.
- 
Method SummaryModifier and TypeMethodDescriptionaddException(Exception exception) Deprecated.addException(ArtifactRepository repository, Exception exception) Records the specified exception while resolving the artifact.Gets the resolved artifact (if any).Gets the exceptions that occurred while resolving the artifact.Gets theLocalArtifactResultreceived during artifact resolution.Gets the exceptions that occurred while resolving the artifact.Gets the repository from which the artifact was eventually resolved.Gets the resolution request that was made.booleanIndicates whether the requested artifact is not present in any of the specified repositories.booleanIndicates whether the requested artifact was resolved.setArtifact(Artifact artifact) Sets the resolved artifact.voidsetLocalArtifactResult(LocalArtifactResult localArtifactResult) Sets theLocalArtifactResultthat is received during artifact resolution.setRepository(ArtifactRepository repository) Sets the repository from which the artifact was resolved.toString()
- 
Field Details- 
NO_REPOSITORYA sentinel object, that is used as key for exceptions that had no related repository during resolution.- Since:
- 2.0.0
 
 
- 
- 
Constructor Details- 
ArtifactResultCreates a new result for the specified request.- Parameters:
- request- The resolution request, must not be- null.
 
 
- 
- 
Method Details- 
getRequestGets the resolution request that was made.- Returns:
- The resolution request, never null.
 
- 
getArtifactGets the resolved artifact (if any). UsegetExceptions()to query the errors that occurred while trying to resolve the artifact.- Returns:
- The resolved artifact or nullif the resolution failed.
 
- 
setArtifactSets the resolved artifact.- Parameters:
- artifact- The resolved artifact, may be- nullif the resolution failed.
- Returns:
- This result for chaining, never null.
 
- 
getExceptionsGets the exceptions that occurred while resolving the artifact. Note that this list can be non-empty even if the artifact was successfully resolved, e.g. when one of the contacted remote repositories didn't contain the artifact but a later repository eventually contained it.- Returns:
- The exceptions that occurred, never null.
- See Also:
 
- 
getMappedExceptionsGets the exceptions that occurred while resolving the artifact. Note that this map can be non-empty even if the artifact was successfully resolved, e.g. when one of the contacted remote repositories didn't contain the artifact but a later repository eventually contained it.- Returns:
- Map of exceptions per repository, that occurred during resolution, never null.
- Since:
- 2.0.0
- See Also:
 
- 
addExceptionDeprecated.UseaddException(ArtifactRepository, Exception)method instead.Records the specified exception while resolving the artifact.- Parameters:
- exception- The exception to record, may be- null.
- Returns:
- This result for chaining, never null.
 
- 
addExceptionRecords the specified exception while resolving the artifact.- Parameters:
- exception- The exception to record, may be- null.
- Returns:
- This result for chaining, never null.
- Since:
- 2.0.0
 
- 
getRepositoryGets the repository from which the artifact was eventually resolved. Note that successive resolutions of the same artifact might yield different results if the employed local repository does not track the origin of an artifact.- Returns:
- The repository from which the artifact was resolved or nullif unknown.
 
- 
setRepositorySets the repository from which the artifact was resolved.- Parameters:
- repository- The repository from which the artifact was resolved, may be- null.
- Returns:
- This result for chaining, never null.
 
- 
getLocalArtifactResultGets theLocalArtifactResultreceived during artifact resolution.- Returns:
- The LocalArtifactResultornull.
- Since:
- 1.9.6
 
- 
setLocalArtifactResultSets theLocalArtifactResultthat is received during artifact resolution.- Parameters:
- localArtifactResult- The local artifact result.
- Since:
- 1.9.6
 
- 
isResolvedIndicates whether the requested artifact was resolved. Note that the artifact might have been successfully resolved despitegetExceptions()indicating transfer errors while trying to fetch the artifact from some of the specified remote repositories.- Returns:
- trueif the artifact was resolved,- falseotherwise.
- See Also:
 
- 
isMissingIndicates whether the requested artifact is not present in any of the specified repositories.- Returns:
- trueif the artifact is not present in any repository,- falseotherwise.
 
- 
toString
 
- 
addException(ArtifactRepository, Exception)method instead.