This is an automated email from the ASF dual-hosted git repository.

hboutemy pushed a commit to branch sinkfactory
in repository https://gitbox.apache.org/repos/asf/maven-reporting-impl.git

commit f37b20afdb3b2614a28d23faa35c0e066e11a524
Author: HervĂ© Boutemy <[email protected]>
AuthorDate: Sat Dec 13 19:17:40 2025 +0900

    log every output file
---
 .../maven/reporting/AbstractMavenReport.java       | 11 ++++-
 .../reporting/AbstractSinkFactoryAdapter.java      | 54 ++++++++++++++++++++++
 2 files changed, 64 insertions(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/maven/reporting/AbstractMavenReport.java 
b/src/main/java/org/apache/maven/reporting/AbstractMavenReport.java
index 98157aa..8e1e699 100644
--- a/src/main/java/org/apache/maven/reporting/AbstractMavenReport.java
+++ b/src/main/java/org/apache/maven/reporting/AbstractMavenReport.java
@@ -235,7 +235,16 @@ public abstract class AbstractMavenReport extends 
AbstractMojo implements MavenM
 
         try {
             Locale locale = getLocale();
-            generate(sink, sinkFactory, locale);
+            generate(
+                    sink,
+                    new AbstractSinkFactoryAdapter(sinkFactory) {
+                        @Override
+                        public Sink createSink(File file, String filename) 
throws IOException {
+                            getLog().info("          " + 
relativeOutput.resolve(filename));
+                            return super.createSink(file, filename);
+                        }
+                    },
+                    locale);
         } catch (MavenReportException e) {
             throw new MojoExecutionException(
                     "An error has occurred in " + getName(Locale.ENGLISH) + " 
report generation.", e);
diff --git 
a/src/main/java/org/apache/maven/reporting/AbstractSinkFactoryAdapter.java 
b/src/main/java/org/apache/maven/reporting/AbstractSinkFactoryAdapter.java
new file mode 100644
index 0000000..002726e
--- /dev/null
+++ b/src/main/java/org/apache/maven/reporting/AbstractSinkFactoryAdapter.java
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.maven.reporting;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.OutputStream;
+
+import org.apache.maven.doxia.sink.Sink;
+import org.apache.maven.doxia.sink.SinkFactory;
+
+class AbstractSinkFactoryAdapter implements SinkFactory {
+    private final SinkFactory sinkFactory;
+
+    AbstractSinkFactoryAdapter(SinkFactory sinkFactory) {
+        this.sinkFactory = sinkFactory;
+    }
+
+    @Override
+    public Sink createSink(File file, String filename) throws IOException {
+        return sinkFactory.createSink(file, filename);
+    }
+
+    @Override
+    public Sink createSink(File file, String filename, String encoding) throws 
IOException {
+        return sinkFactory.createSink(file, filename, encoding);
+    }
+
+    @Override
+    public Sink createSink(OutputStream outputStream) throws IOException {
+        return sinkFactory.createSink(outputStream);
+    }
+
+    @Override
+    public Sink createSink(OutputStream outputStream, String s) throws 
IOException {
+        return sinkFactory.createSink(outputStream, s);
+    }
+}

Reply via email to