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:
java.io.Serializable
public class ArtifactResolutionException extends RepositoryException
Thrown in case of a unresolvable artifacts.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<ArtifactResult>
results
-
Constructor Summary
Constructors Constructor Description ArtifactResolutionException(java.util.List<ArtifactResult> results)
Creates a new exception with the specified results.ArtifactResolutionException(java.util.List<ArtifactResult> results, java.lang.String message)
Creates a new exception with the specified results and detail message.ArtifactResolutionException(java.util.List<ArtifactResult> results, java.lang.String message, java.lang.Throwable cause)
Creates a new exception with the specified results, detail message and cause.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static java.lang.Throwable
getCause(java.util.List<? extends ArtifactResult> results)
private static java.lang.String
getMessage(java.util.List<? extends ArtifactResult> results)
ArtifactResult
getResult()
Gets the first result fromgetResults()
.java.util.List<ArtifactResult>
getResults()
Gets the resolution results at the point the exception occurred.-
Methods inherited from class org.eclipse.aether.RepositoryException
getMessage
-
-
-
-
Field Detail
-
results
private final transient java.util.List<ArtifactResult> results
-
-
Constructor Detail
-
ArtifactResolutionException
public ArtifactResolutionException(java.util.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(java.util.List<ArtifactResult> results, java.lang.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(java.util.List<ArtifactResult> results, java.lang.String message, java.lang.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 java.util.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.
-
getMessage
private static java.lang.String getMessage(java.util.List<? extends ArtifactResult> results)
-
getCause
private static java.lang.Throwable getCause(java.util.List<? extends ArtifactResult> results)
-
-