CodeGenerator cg = builder.build();
CountingOutputStream counter = new CountingOutputStream(openOutputStream(outFile));
outWriter = new OutputStreamWriter(counter, "UTF-8");
getLog().info("Generating queries wrapper for file: [" + queriesFile.getAbsolutePath() + "] " +
"into java file: [" + outFile.getAbsolutePath() + "]");
cg.generate(queries, fcn, queriesFile.getName(), outWriter);
getLog().info("Writing compete, bytes written: [" + counter.getCount() + "]");
} catch(IOException e) {
throw new MojoFailureException("IO error", e);
} catch (ClassNotFoundException e) {
throw new MojoFailureException("Type id map error", e);