[ 
https://issues.apache.org/jira/browse/DOXIATOOLS-88?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17896881#comment-17896881
 ] 

ASF GitHub Bot commented on DOXIATOOLS-88:
------------------------------------------

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


##########
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:
   For me this is worth to be always emitted as when giving a directory as 
input parameter it is otherwise not clear which files within are removed.





> Optionally remove input files after conversion
> ----------------------------------------------
>
>                 Key: DOXIATOOLS-88
>                 URL: https://issues.apache.org/jira/browse/DOXIATOOLS-88
>             Project: Maven Doxia Tools
>          Issue Type: Improvement
>          Components: Doxia Converter
>            Reporter: Konrad Windszus
>            Assignee: Konrad Windszus
>            Priority: Major
>             Fix For: doxia-converter-1.4
>
>
> Currently if a directory is given to the {{in}} parameter it is only read. 
> However usually after conversion you want to remove the original input files. 
> There should be a dedicated flag which allows to achieve that automatically.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to