code: private Artifact getArtifactResult(Artifact desiredArtifact) throws MojoExecutionException {// NOSONAR
          ArtifactRequest artifactRequest = new ArtifactRequest();
          artifactRequest.setArtifact(desiredArtifact);
          artifactRequest.setRepositories(repositoryList);
          try {
              return repositorySystem.resolveArtifact(repositorySystemSession, artifactRequest).getArtifact();
          } catch (ArtifactResolutionException e) {
              throw new MojoExecutionException(e.getMessage(), e);
          }
      }
docs: Find a specific artifact in a remote repository
  
  @param desiredArtifact The artifact that we want to find
  @return Will return an ArtifactResult object
  @throws MojoExecutionException MojoExecutionException