mirror of https://github.com/apache/maven.git
o Improved error reporting
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@750906 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
048808f308
commit
ba677b1fb9
|
@ -162,7 +162,8 @@ else if ( !artifact.isResolved() )
|
|||
{
|
||||
if ( !isOnline() )
|
||||
{
|
||||
throw new ArtifactNotFoundException( "The repository system is offline.", artifact );
|
||||
throw new ArtifactResolutionException( "The repository system is offline and the artifact "
|
||||
+ artifact + " is not available in the local repository.", artifact );
|
||||
}
|
||||
|
||||
try
|
||||
|
|
|
@ -695,7 +695,17 @@ private List<DomainModel> getDomainModelParentsFromRepository( PomClassicDomainM
|
|||
|
||||
Artifact artifactParent = repositorySystem.createParentArtifact( domainModel.getParentGroupId(), domainModel.getParentArtifactId(), domainModel.getParentVersion() );
|
||||
|
||||
ArtifactResolutionResult result = repositorySystem.resolve( new ArtifactResolutionRequest( artifactParent, localRepository, remoteRepositories ) );
|
||||
ArtifactResolutionRequest request = new ArtifactResolutionRequest( artifactParent, localRepository, remoteRepositories );
|
||||
ArtifactResolutionResult result = repositorySystem.resolve( request );
|
||||
try
|
||||
{
|
||||
resolutionErrorHandler.throwErrors( request, result );
|
||||
}
|
||||
catch ( ArtifactResolutionException e )
|
||||
{
|
||||
throw (IOException) new IOException( "The parent POM " + artifactParent
|
||||
+ " could not be retrieved from any repository" ).initCause( e );
|
||||
}
|
||||
|
||||
PomClassicDomainModel parentDomainModel = new PomClassicDomainModel( artifactParent.getFile() );
|
||||
|
||||
|
|
Loading…
Reference in New Issue