@Nullable
  public static MavenArtifact findArtifact(
      @NotNull MavenProject project, @Nullable Library library) {
    if (library == null) return null;

    String name = library.getName();

    if (!MavenArtifact.isMavenLibrary(name)) return null;

    for (MavenArtifact each : project.getDependencies()) {
      if (each.getLibraryName().equals(name)) return each;
    }
    return null;
  }
 public static boolean isMavenLibrary(@Nullable Library library) {
   return library != null && MavenArtifact.isMavenLibrary(library.getName());
 }