fr.jcgay.maven.profiler.reporting.Files Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of maven-profiler Show documentation
Show all versions of maven-profiler Show documentation
Log Maven mojos execution time
package fr.jcgay.maven.profiler.reporting;
import org.slf4j.Logger;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import static org.slf4j.LoggerFactory.getLogger;
public final class Files {
private static final Logger LOGGER = getLogger(Files.class);
private Files() {
}
public static void write(File target, String content) {
FileWriter writer = null;
try {
writer = new FileWriter(target);
writer.write(content);
} catch (IOException e) {
LOGGER.error("Cannot write profiler report.", e);
} finally {
if (writer != null) {
try {
writer.close();
} catch (IOException e) {
LOGGER.error("Error while closing resource.", e);
}
}
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy