public final Artifact resolveArtifact ( Artifact mavenArtifact ) throws MojoExecutionException { final org . eclipse . aether . artifact . Artifact aetherArtifact = createArtifact ( mavenArtifact ) ; final ArtifactRequest request = new ArtifactRequest ( ) ; request . setArtifact ( aetherArtifact ) ; request . setRepositories ( getRemoteRepositoryList ( ) ) ; final ArtifactResult result ; try { result = getRepositorySystem ( ) . resolveArtifact ( getRepositorySystemSession ( ) , request ) ; } catch ( ArtifactResolutionException e ) { throw new MojoExecutionException ( e . getMessage ( ) , e ) ; } return createArtifact ( result . getArtifact ( ) ) ; }
Retreive the extended artifact definition of the given artifact .