in src/main/java/org/apache/maven/doxia/DefaultConverter.java [375:400]
private void postProcessFile(File inputFile, File outputFile) throws IOException, InterruptedException {
switch (postProcess) {
case REMOVE_AFTER_CONVERSION:
Files.delete(inputFile.toPath());
LOGGER.info("Removed input file \"{}\" after successful conversion", inputFile);
break;
case GIT_MV_INPUT_TO_OUTPUT:
// first move rename output file to tmp file name
Path tmpOutputFile = outputFile.toPath().resolveSibling(outputFile.getName() + ".tmp");
Files.move(outputFile.toPath(), tmpOutputFile);
LOGGER.info(
"Renamed output file \"{}\" to temp name \"{}\"",
outputFile.getCanonicalPath(),
tmpOutputFile.getFileName());
// rename all input files to have the proper extension (must be individually committed)
executeCommand("git", "mv", inputFile.getCanonicalPath(), outputFile.getCanonicalPath());
LOGGER.info(
"Moved input file \"{}\" to output file \"{}\" (keeping the old content)",
inputFile.getCanonicalPath(),
outputFile.getCanonicalPath());
outputRenameMap.put(tmpOutputFile, outputFile.getCanonicalFile().toPath());
break;
default:
break;
}
}