code: private ProjectStage detectProjectStage() {
  
          // build sorted list of detector implementations
          List<ProjectStageDetector> detectors = new ArrayList<ProjectStageDetector>();
          for (Iterator<ProjectStageDetector> iter = ServiceLoader.load(ProjectStageDetector.class).iterator(); iter.hasNext();) {
              detectors.add(iter.next());
          }
          Collections.sort(detectors, new Sortable.Comparator());
  
          // try all detectors
          for(ProjectStageDetector detector : detectors) {
  
              // lets the detector do its job
              ProjectStage stage = detector.getProjectStage();
  
              if (log.isTraceEnabled()) {
                  log.trace("Detector " + detector.getClass().getName() + " returned: " + stage);
              }
  
              if (stage != null) {
                  log.info("Detected project stage: " + stage);
                  return stage;
              }
  
          }
  
          if (log.isDebugEnabled()) {
              log.debug("No result from detectors! Using default project stage: " + DEFAULT_PROJECT_STAGE);
          }
  
          return DEFAULT_PROJECT_STAGE;
  
      }
docs: Method to detect the current project stage. The method will use the {@link ProjectStageDetector} SPI to obtain the
  project stage. The fall back value is {@link ProjectStage#Development}.