interconnect/interconnect-maven-plugin/src/main/java/de/taimos/dvalin/interconnect/model/maven/GeneratorHelper.java
/**
     * @param log       the logger
     * @param model     the generator model
     * @param targetDir the target path for generation
     * @throws MojoExecutionException on errors
     */
@param log       the logger
@param model     the generator model
@param targetDir the target path for generation
@throws MojoExecutionException on errors
@param log the logger @param model the generator model @param targetDir the target path for generation @throws MojoExecutionException on errors
public static void writeFile(GeneratorModel<?, ?> model, String targetDir) throws MojoExecutionException {
        if (model.getGenerationContexts() == null || model.getGenerationContexts().isEmpty()) {
            return;
        }
        for (GenerationContext generationContext : model.getGenerationContexts()) {
            generationContext.setTemplate(GeneratorHelper.prepareTemplate(model.getLogger(), generationContext));
            generationContext.setTargetDir(targetDir + model.getTargetFolder());
            GeneratorHelper.createFileWithTemplate(model, generationContext);
        }
    }
public static void writeFile ( GeneratorModel < ? , ? > model , String targetDir ) throws MojoExecutionException { if ( model . getGenerationContexts ( ) == null || model . getGenerationContexts ( ) . isEmpty ( ) ) { return ; } for ( GenerationContext generationContext : model . getGenerationContexts ( ) ) { generationContext . setTemplate ( GeneratorHelper . prepareTemplate ( model . getLogger ( ) , generationContext ) ) ; generationContext . setTargetDir ( targetDir + model . getTargetFolder ( ) ) ; GeneratorHelper . createFileWithTemplate ( model , generationContext ) ; } }
@param log       the logger
 @param model     the generator model
 @param targetDir the target path for generation
 @throws MojoExecutionException on errors
@param log the logger @param model the generator model @param targetDir the target path for generation @throws MojoExecutionException on errors