code: public static boolean hasDependency(Model pom, String groupId, String artifactId) {
          if (pom != null) {
              List<org.apache.maven.model.Dependency> dependencies = pom.getDependencies();
              return hasDependency(dependencies, groupId, artifactId);
          }
          return false;
      }
docs: Returns true if the pom has the given dependency