michael-o commented on code in PR #85:
URL: 
https://github.com/apache/maven-doxia-converter/pull/85#discussion_r1834853397


##########
src/main/java/org/apache/maven/doxia/DefaultConverter.java:
##########
@@ -248,14 +249,21 @@ public void convert(InputFileWrapper input, 
OutputFileWrapper output)
                 for (File f : files) {
                     File relativeOutputDirectory = new File(
                             
PathTool.getRelativeFilePath(input.getFile().getAbsolutePath(), f.getParent()));
-                    parse(f, input.getEncoding(), input.getFormat(), output, 
relativeOutputDirectory);
+                    convert(f, input.getEncoding(), input.getFormat(), output, 
relativeOutputDirectory);
+                    cleanUp(input, f);
                 }
             }
         } finally {
             stopPlexusContainer();
         }
     }
 
+    private void cleanUp(InputFileWrapper input, File f) {
+        if (input.cleanUp(f)) {
+            LOGGER.info("Removed input file \"{}\" after successfull 
conversion", f);

Review Comment:
   Isn't that too verbose at info level?



##########
src/main/java/org/apache/maven/doxia/cli/CLIManager.java:
##########
@@ -93,6 +95,10 @@ class CLIManager {
                 .desc("Input file or directory.")
                 .hasArg()
                 .build());
+        OPTIONS.addOption(Option.builder(REMOVE_IN)
+                .longOpt("removeInputAfterConversion")
+                .desc("Whether to remove the input file(s) after successfull 
conversion")

Review Comment:
   successful



##########
src/main/java/org/apache/maven/doxia/DefaultConverter.java:
##########
@@ -426,6 +434,10 @@ private void parse(
                 throw new ConverterException("IOException: " + e.getMessage(), 
e);
             }
         }
+        LOGGER.info(

Review Comment:
   ditto



##########
src/main/java/org/apache/maven/doxia/DefaultConverter.java:
##########
@@ -248,14 +249,21 @@ public void convert(InputFileWrapper input, 
OutputFileWrapper output)
                 for (File f : files) {
                     File relativeOutputDirectory = new File(
                             
PathTool.getRelativeFilePath(input.getFile().getAbsolutePath(), f.getParent()));
-                    parse(f, input.getEncoding(), input.getFormat(), output, 
relativeOutputDirectory);
+                    convert(f, input.getEncoding(), input.getFormat(), output, 
relativeOutputDirectory);
+                    cleanUp(input, f);
                 }
             }
         } finally {
             stopPlexusContainer();
         }
     }
 
+    private void cleanUp(InputFileWrapper input, File f) {
+        if (input.cleanUp(f)) {
+            LOGGER.info("Removed input file \"{}\" after successfull 
conversion", f);

Review Comment:
   successful



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to