import java.nio.file.Files

System.err.println('GAVCT: ' + groupId + ':' + artifactId + ':' + version + ':' + classifier + ':' + type);

separator = File.separator
String filename = '../../../target/it/generate-javadocs-file/target/' + artifactId + '-' + version + '-' + classifier + '.' + type;
filename = filename.replace("/", separator)
File javadocsFile = new File(basedir, filename);

System.err.println('Generated javadocs file ' + javadocsFile.getAbsolutePath());
assert javadocsFile.exists();

File logFile = new File(basedir, "build.log");
assert logFile.exists();
File logFileCopy = new File(logFile.getParentFile(), "generate-file-" + logFile.getName())
if (logFileCopy.exists()) {
    logFileCopy.delete();
}
Files.copy(logFile.toPath(), logFileCopy.toPath());

return true;