model.setGroupId( artifact.getGroupId() );
model.setArtifactId( artifact.getArtifactId() );
}
catch ( IOException e )
{
throw new ArtifactMetadataRetrievalException( e );
}
catch ( XmlPullParserException e )
{
throw new ArtifactMetadataRetrievalException( e );
}
finally
{
IOUtil.close( r );
}
Set artifacts;
try
{
artifacts = createArtifacts( model.getDependencies(), artifact.getScope() );
}
catch ( InvalidVersionSpecificationException e )
{
throw new ArtifactMetadataRetrievalException( e );
}
List artifactRepositories;
try
{
artifactRepositories =
ProjectUtils.buildArtifactRepositories( model.getRepositories(), repositoryFactory, container );
}
catch ( InvalidRepositoryException e )
{
throw new ArtifactMetadataRetrievalException( e );
}
return new ResolutionGroup( artifact, artifacts, artifactRepositories );
}