code: private Model getModel(FileResource item, Scanner scanner) throws IOException {
          PomModelBuilder pomModelBuilder = scanner.getContext().peekOrDefault(PomModelBuilder.class, null);
          if (pomModelBuilder != null) {
              return pomModelBuilder.getModel(item.getFile());
          }
          Model model = null;
          try (InputStream stream = item.createStream()) {
              model = mavenXpp3Reader.read(stream);
          } catch (XmlPullParserException e) {
              String msg = "Cannot read POM descriptor from " + item.getFile().getAbsolutePath() + ".";
  
              LOGGER.warn(msg, e);
          }
          return model;
      }
docs: Build the POM model from the given file resource (i.e. a pom.xml).
  
  @param item
  The file resource.
  @param scanner
  The scanner.
  @return The model.
  @throws IOException
  If the model cannot be read.