org.sonatype.aether.artifact.Artifact resolveSideArtifact(final org.sonatype.aether.artifact.Artifact mainArtifact,
        final String classifier,
        final String type)
        throws SideArtifactNotFoundException
  {
    final org.sonatype.aether.artifact.Artifact sideArtifact = getSideArtifact(mainArtifact, classifier, type);

    final ArtifactRequest artifactRequest = new ArtifactRequest();
    artifactRequest.setRepositories(projectRepos);
    artifactRequest.setArtifact(sideArtifact);

    try {

      final ArtifactResult result = repoSystem.resolveArtifact(repoSession, artifactRequest);

      return getResolvedSideArtifact(sideArtifact, result);

    }
    catch (ArtifactResolutionException ex) {
      
      final boolean sideArtifactAvailable = sideArtifact != null;
      throw new SideArtifactNotFoundException("Side artifact " +
            (sideArtifactAvailable ? sideArtifact.getGroupId() : "<n/a>") + ":" +
            (sideArtifactAvailable ? sideArtifact.getArtifactId() : "<n/a>") + ":" +
            (sideArtifactAvailable ? sideArtifact.getVersion() : "<n/a>") + ":" +
            (sideArtifactAvailable ? sideArtifact.getClassifier() : "<n/a>")
            + " could not be resolved.", sideArtifact, ex);
    }
  }
org . sonatype . aether . artifact . Artifact resolveSideArtifact ( final org . sonatype . aether . artifact . Artifact mainArtifact , final String classifier , final String type ) throws SideArtifactNotFoundException { final org . sonatype . aether . artifact . Artifact sideArtifact = getSideArtifact ( mainArtifact , classifier , type ) ; final ArtifactRequest artifactRequest = new ArtifactRequest ( ) ; artifactRequest . setRepositories ( projectRepos ) ; artifactRequest . setArtifact ( sideArtifact ) ; try { final ArtifactResult result = repoSystem . resolveArtifact ( repoSession , artifactRequest ) ; return getResolvedSideArtifact ( sideArtifact , result ) ; } catch ( ArtifactResolutionException ex ) { final boolean sideArtifactAvailable = sideArtifact != null ; throw new SideArtifactNotFoundException ( "Side artifact " + ( sideArtifactAvailable ? sideArtifact . getGroupId ( ) : "<n/a>" ) + ":" + ( sideArtifactAvailable ? sideArtifact . getArtifactId ( ) : "<n/a>" ) + ":" + ( sideArtifactAvailable ? sideArtifact . getVersion ( ) : "<n/a>" ) + ":" + ( sideArtifactAvailable ? sideArtifact . getClassifier ( ) : "<n/a>" ) + " could not be resolved." , sideArtifact , ex ) ; } }
@return The requested artifact according to the <code>groupId</code>, <code>artifactId</code>
and <code>version</code> of the main artifact and <code>classifier</code> and
<code>type</code> as specified by the actual parameters.
@throws SideArtifactNotFoundException
If the requested artifact does not exist inside the remote repositories