List of usage examples for org.apache.maven.plugin.logging Log info
void info(Throwable error);
From source file:org.openehealth.ipf.labs.maven.dsldoc.descriptor.AbstractDslRenderer.java
License:Apache License
public void writeToFile(Documentation doc, JavaClass cls, File outputDirectory, Log log) throws IOException { File file = createTargetDescriptorFile(cls, outputDirectory, log); log.info("Writing " + this.toString() + " (" + file.getAbsolutePath() + ")"); String descriptorContent = render(doc); writeFile(file, descriptorContent);/*from w w w . j a v a 2s. c om*/ }
From source file:org.openehealth.ipf.labs.maven.dsldoc.Extractor.java
License:Apache License
/** * Generates DSL descriptor files for the given module. The modules are per * extension class.// w ww .j ava 2s. com * * @param module * the module to generate the GDSL files for. * @param outputDirectory * the destination directory for the GDSL files. * @param sourceDir * the source directories to be scanned for dsl extensions. * @param log * the logger to use. * @throws IOException * if reading or writing a file failed. */ public void generateDSLDescriptors(String module, File outputDirectory, String[] sourceDir, Log log) throws IOException { Documentation doc = new Documentation(types); DslDocBuilder builder = addSources(sourceDir, log); builder.getClassLibrary().addClassLoader(new GroovyClassLoader()); if (builder.getSources().length == 0) { log.info("No sources found."); return; } log.info("Processing sources"); for (JavaSource src : builder.getSources()) { for (JavaClass cls : src.getClasses()) { if (null != cls.getTagByName(Documentation.DSL_TAG)) { for (JavaMethod method : cls.getMethods()) { doc.registerMethod(module, cls, method); } eclipse.writeToFile(doc, cls, outputDirectory, log); idea.writeToFile(doc, cls, outputDirectory, log); } } } }
From source file:org.openehealth.ipf.labs.maven.dsldoc.Extractor.java
License:Apache License
/** * Generate a DSL HTML fragment for the given module. The fragmrents are merged on * reporting phase by {@link DslIndexReport} * /* www. ja v a 2 s .c om*/ * @param module * the name of the module to generate the report for. * @param outputDirectory * the directory that the DSL index is created in. * @param sourceDirs * the source directories to be scanned for dsl extensions. * @param log * the logger to use. * @throws IOException * if reading or writing a file failed. */ public void generateDSLHTMLFragment(String module, File outputDirectory, String[] sourceDirs, Log log) throws IOException { Documentation doc = new Documentation(types); DslDocBuilder builder = addSources(sourceDirs, log); if (builder.getSources().length == 0) { log.info("No sources found."); return; } log.info("Processing sources"); for (JavaSource src : builder.getSources()) { for (JavaClass cls : src.getClasses()) { for (JavaMethod method : cls.getMethods()) { doc.registerMethod(module, cls, method); } } } JavaClass DUMMY = new JavaClass(); html.writeToFile(doc, DUMMY, outputDirectory, log); }