code: public void verifyPom() {
          String pomFileName = pomFile.getAbsolutePath();
          log.info("Verifying file " + pomFileName);
  
          XmlOrderedResult xmlOrderedResult = isPomElementsSorted();
          if (!xmlOrderedResult.isOrdered()) {
              switch (verifyFailType) {
                  case WARN:
                      log.warn(xmlOrderedResult.getErrorMessage());
                      saveViolationFile(xmlOrderedResult);
                      log.warn(String.format(TEXT_FILE_NOT_SORTED, pomFileName));
                      break;
                  case SORT:
                      log.info(xmlOrderedResult.getErrorMessage());
                      saveViolationFile(xmlOrderedResult);
                      log.info(String.format(TEXT_FILE_NOT_SORTED, pomFileName));
                      sortPom();
                      break;
                  case STOP:
                      log.error(xmlOrderedResult.getErrorMessage());
                      saveViolationFile(xmlOrderedResult);
                      log.error(String.format(TEXT_FILE_NOT_SORTED, pomFileName));
                      throw new FailureException(String.format(TEXT_FILE_NOT_SORTED, pomFileName));
              }
          }
      }
docs: Verify that the pom-file is sorted regardless of formatting