@Override
  protected List<ValueSource> createValueSources(Model model,
                                                 File projectDir,
                                                 ModelBuildingRequest config,
                                                 ModelProblemCollector problems) {
    List<ValueSource> sources = super.createValueSources(model, projectDir, config, problems);

    if (localRepository != null) {
      sources.add(new SingleResponseValueSource("settings.localRepository", localRepository));
    }

    int firstMapIndex = -1;
    for (int i = 0; i < sources.size(); i++) {
      if (sources.get(i) instanceof MapBasedValueSource) {
        firstMapIndex = i;
        break;
      }
    }

    Map<String, Object> rightOrderProperties = new HashMap<String, Object>(3);
    if (config.getSystemProperties().containsKey(REVISION_PROPERTY)) {
      rightOrderProperties.put(REVISION_PROPERTY, config.getSystemProperties().getProperty(REVISION_PROPERTY));
    }
    if (config.getSystemProperties().containsKey(CHANGELIST_PROPERTY)) {
      rightOrderProperties.put(CHANGELIST_PROPERTY, config.getSystemProperties().getProperty(CHANGELIST_PROPERTY));
    }
    if (config.getSystemProperties().containsKey(SHA1_PROPERTY)) {
      rightOrderProperties.put(SHA1_PROPERTY, config.getSystemProperties().getProperty(SHA1_PROPERTY));
    }
    // these 3 system properties must be resolved before model properties
    sources.add(firstMapIndex + 1, new MapBasedValueSource(rightOrderProperties));

    return sources;
  }
@Override
  protected List<ValueSource> createValueSources(Model model,
                                                 File projectDir,
                                                 ModelBuildingRequest config,
                                                 ModelProblemCollector problems)