Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,16 @@ private void reportToMarkup() throws MojoExecutionException {

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));
Comment thread
hboutemy marked this conversation as resolved.
return super.createSink(file, filename);
}
},
locale);
} catch (MavenReportException e) {
throw new MojoExecutionException(
"An error has occurred in " + getName(Locale.ENGLISH) + " report generation.", e);
Expand Down
Original file line number Diff line number Diff line change
@@ -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);
}
}