ArtifactFactory factory = (ArtifactFactory) lookup( ArtifactFactory.ROLE );
Artifact parentArtifact = factory.createParentArtifact( groupId, artifactId, version );
try
{
MavenMetadataSource metadataSource = (MavenMetadataSource) lookup( ArtifactMetadataSource.ROLE );
ArtifactResolver resolver = (ArtifactResolver) lookup( ArtifactResolver.ROLE );
List remoteRepositories = createRemoteArtifactRepositories( model.getRepositories() );
resolver.resolveTransitively( Collections.singleton( parentArtifact ),
createDummyArtifact(), createLocalArtifactRepository(),