refactoring to enable maven-plugin to use the same methods in
CodeGenMain