includePaths.add(Paths.get(".")); builder.includePaths(includePaths); List<String> protoFiles = cmd.getArgList(); builder.protoFiles(protoFiles);
@Override public void execute() throws MojoExecutionException, MojoFailureException { super.execute(); ProtostuffCompiler compiler = new ProtostuffCompiler(); final Path sourcePath = getSourcePath(); String output = computeSourceOutputDir(target); Set<String> allTemplates = new LinkedHashSet<>(); if (template != null) { allTemplates.add(template); } if (templates != null) { allTemplates.addAll(templates); } List<String> protoFiles = findProtoFiles(sourcePath); ModuleConfiguration moduleConfiguration = ImmutableModuleConfiguration.builder() .name("java") .includePaths(singletonList(sourcePath)) .generator(CompilerModule.ST4_COMPILER) .putOptions(CompilerModule.TEMPLATES_OPTION, allTemplates) .putOptions(CompilerModule.EXTENSIONS_OPTION, extensions) .output(output) .addAllProtoFiles(protoFiles) .build(); compiler.compile(moduleConfiguration); addGeneratedSourcesToProject(output); }
@Override public void execute() throws MojoExecutionException, MojoFailureException { super.execute(); ProtostuffCompiler compiler = new ProtostuffCompiler(); final Path sourcePath = getSourcePath(); List<String> protoFiles = findProtoFiles(sourcePath); ModuleConfiguration moduleConfiguration = ImmutableModuleConfiguration.builder() .name("html") .includePaths(singletonList(sourcePath)) .generator(CompilerModule.HTML_COMPILER) .output(target.getAbsolutePath()) .putOptions(HtmlGenerator.PAGES, pages) .addAllProtoFiles(protoFiles) .build(); compiler.compile(moduleConfiguration); }
@Override public void execute() throws MojoExecutionException, MojoFailureException { super.execute(); ProtostuffCompiler compiler = new ProtostuffCompiler(); final Path sourcePath = getSourcePath(); String output = computeSourceOutputDir(target); List<String> protoFiles = findProtoFiles(sourcePath); ModuleConfiguration moduleConfiguration = ImmutableModuleConfiguration.builder() .name("java") .includePaths(singletonList(sourcePath)) .generator("java") .output(output) .protoFiles(protoFiles) .build(); compiler.compile(moduleConfiguration); addGeneratedSourcesToProject(output); }