private static boolean isPomXml(Path path) {
    String filename = path.getFileName().toString();
    return filename.startsWith("pom") && filename.endsWith(".xml");
  }
Works with the test Maven projects in the {@code resources/projects} directory.
jib-maven-plugin/src/test/java/com/google/cloud/tools/jib/maven/TestProject.java