code: private <T extends MavenArtifactDescriptor> T getMavenArtifactDescriptor(Coordinates coordinates, ArtifactResolver artifactResolver, Class<T> type,
                                                                               Scanner scanner) {
          MavenArtifactDescriptor mavenArtifactDescriptor = artifactResolver.resolve(coordinates, scanner.getContext());
          return scanner.getContext().getStore().addDescriptorType(mavenArtifactDescriptor, type);
      }
docs: Returns a resolved maven artifact descriptor for the given coordinates.
  
  @param coordinates
  The artifact coordinates.
  @param artifactResolver
  The artifact resolver.
  @param type
  The expected type.
  @param scanner
  The scanner.
  @return The artifact descriptor.