Package org.eclipse.aether.resolution
Class ArtifactResolutionException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- org.eclipse.aether.RepositoryException
-
- org.eclipse.aether.resolution.ArtifactResolutionException
-
- All Implemented Interfaces:
Serializable
public class ArtifactResolutionException extends RepositoryException
Thrown in case of a unresolvable artifacts.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ArtifactResolutionException(List<ArtifactResult> results)
Creates a new exception with the specified results.ArtifactResolutionException(List<ArtifactResult> results, String message)
Creates a new exception with the specified results and detail message.ArtifactResolutionException(List<ArtifactResult> results, String message, Throwable cause)
Creates a new exception with the specified results, detail message and cause.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ArtifactResult
getResult()
Gets the first result fromgetResults()
.List<ArtifactResult>
getResults()
Gets the resolution results at the point the exception occurred.-
Methods inherited from class org.eclipse.aether.RepositoryException
getMessage
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
ArtifactResolutionException
public ArtifactResolutionException(List<ArtifactResult> results)
Creates a new exception with the specified results.- Parameters:
results
- The resolution results at the point the exception occurred, may benull
.
-
ArtifactResolutionException
public ArtifactResolutionException(List<ArtifactResult> results, String message)
Creates a new exception with the specified results and detail message.- Parameters:
results
- The resolution results at the point the exception occurred, may benull
.message
- The detail message, may benull
.
-
ArtifactResolutionException
public ArtifactResolutionException(List<ArtifactResult> results, String message, Throwable cause)
Creates a new exception with the specified results, detail message and cause.- Parameters:
results
- The resolution results at the point the exception occurred, may benull
.message
- The detail message, may benull
.cause
- The exception that caused this one, may benull
.
-
-
Method Detail
-
getResults
public List<ArtifactResult> getResults()
Gets the resolution results at the point the exception occurred. Despite being incomplete, callers might want to use these results to fail gracefully and continue their operation with whatever interim data has been gathered.- Returns:
- The resolution results or
null
if unknown.
-
getResult
public ArtifactResult getResult()
Gets the first result fromgetResults()
. This is a convenience method for cases where callers know only a single result/request is involved.- Returns:
- The (first) resolution result or
null
if none.
-
-