public void run()

in winegrower-extension/winegrower-build/winegrower-build-common/src/main/java/org/apache/winegrower/extension/build/common/Run.java [45:73]


    public void run() {
        final Map<String, String> oldSystemPropsValues;
        if (systemVariables != null) {
            oldSystemPropsValues = systemVariables.keySet().stream()
                                                  .filter(it -> System.getProperty(it) != null)
                                                  .collect(toMap(identity(), System::getProperty));
            systemVariables.forEach(System::setProperty);
        } else {
            oldSystemPropsValues = emptyMap();
        }
        try (final Ripener framework = new Ripener.Impl(configuration).start()) {
            this.framework = framework;
            onStart();
            waitForExit();
        } finally {
            this.framework = null;
            if (systemVariables != null) {
                systemVariables.keySet().forEach(key -> {
                    final String value = oldSystemPropsValues.get(key);
                    if (value != null) {
                        System.setProperty(key, value);
                    } else {
                        System.clearProperty(key);
                    }
                });
            }
            onStop();
        }
    }