![JAR search and dependency download from the Maven repository](/logo.png)
net.truelicense.maven.plugin.commons.CheckedLog Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of truelicense-maven-plugin Show documentation
Show all versions of truelicense-maven-plugin Show documentation
The TrueLicense Maven Plugin generates source files from Apache
Velocity template files or obfuscates constant string values in class
files.
/*
* Copyright (C) 2005-2017 Schlichtherle IT Services.
* All rights reserved. Use is subject to license terms.
*/
package net.truelicense.maven.plugin.commons;
import org.apache.maven.plugin.MojoFailureException;
import org.apache.maven.plugin.logging.Log;
/**
* @author Christian Schlichtherle
*/
final class CheckedLog extends DecoratingLog {
private boolean error;
CheckedLog(Log log) { super(log); }
void check() throws MojoFailureException {
if (error) throw new MojoFailureException("Check logging output.");
}
@Override
public void error(CharSequence content) {
log.error(content);
this.error = true;
}
@Override
public void error(CharSequence content, Throwable error) {
log.error(content, error);
this.error = true;
}
@Override
public void error(Throwable error) {
log.error(error);
this.error = true;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy