in src/main/java/org/apache/sling/feature/modelconverter/FeatureToProvisioning.java [68:96]
public static void convert(File inputFile, File outputFile, FeatureProvider fp, File ... additionalInputFiles) throws UncheckedIOException {
if (outputFile.exists()) {
if (outputFile.lastModified() >= inputFile.lastModified()) {
LOGGER.debug("Skipping the generation of {} as this file already exists and is not older.", outputFile);
return;
}
}
org.apache.sling.feature.Feature feature = getFeature(inputFile);
if (feature.getPrototype() != null) {
feature = handlePrototype(feature, additionalInputFiles, fp);
}
Object featureNameVar = feature.getVariables().remove(PROVISIONING_MODEL_NAME_VARIABLE);
String provModelName;
if (featureNameVar instanceof String) {
provModelName = (String) featureNameVar;
} else {
provModelName = feature.getId().getArtifactId();
}
String runMode = feature.getVariables().remove(PROVISIONING_RUNMODES);
String[] runModes = null;
if (runMode != null) {
runModes = runMode.split(",");
}
convert(provModelName, feature, inputFile.getName(), outputFile.getAbsolutePath(), runModes);
}