@Test public void testInitializationWithNoFiles() throws MojoExecutionException { MarkdownMojo mojo = new MarkdownMojo(); mojo.basedir = basedir; mojo.buildDirectory = new File(mojo.basedir, "target"); mojo.execute(); assertThat(mojo.instance).isNotNull(); }
public void execute() throws MojoExecutionException { if (extensions == null || extensions.isEmpty()) { extensions = ImmutableList.of("md", "markdown"); } if (instance == null) { instance = new PegDownProcessor(Extensions.ALL); } try { for (File f : getResources(extensions)) { process(f); } } catch (IOException e) { throw new MojoExecutionException("Error while processing a Markdown file", e); } }
MarkdownMojo extends AbstractWisdomWatcherMojo implements Constants { public void execute() throws MojoExecutionException { if (extensions == null || extensions.isEmpty()) { extensions = ImmutableList.of("md", "markdown"); } if (instance == null) { instance = new PegDownProcessor(Extensions.ALL); } try { for (File f : getResources(extensions)) { process(f); } } catch (IOException e) { throw new MojoExecutionException("Error while processing a Markdown file", e); } } }
MarkdownMojo extends AbstractWisdomWatcherMojo implements Constants { public void execute() throws MojoExecutionException { if (extensions == null || extensions.isEmpty()) { extensions = ImmutableList.of("md", "markdown"); } if (instance == null) { instance = new PegDownProcessor(Extensions.ALL); } try { for (File f : getResources(extensions)) { process(f); } } catch (IOException e) { throw new MojoExecutionException("Error while processing a Markdown file", e); } }  }
MarkdownMojo extends AbstractWisdomWatcherMojo implements Constants { public void execute() throws MojoExecutionException { if (extensions == null || extensions.isEmpty()) { extensions = ImmutableList.of("md", "markdown"); } if (instance == null) { instance = new PegDownProcessor(Extensions.ALL); } try { for (File f : getResources(extensions)) { process(f); } } catch (IOException e) { throw new MojoExecutionException("Error while processing a Markdown file", e); } }  void execute(); void process(File input); @Override boolean accept(File file); @Override boolean fileCreated(File file); @Override boolean fileUpdated(File file); @Override boolean fileDeleted(File file); }
MarkdownMojo extends AbstractWisdomWatcherMojo implements Constants { public void execute() throws MojoExecutionException { if (extensions == null || extensions.isEmpty()) { extensions = ImmutableList.of("md", "markdown"); } if (instance == null) { instance = new PegDownProcessor(Extensions.ALL); } try { for (File f : getResources(extensions)) { process(f); } } catch (IOException e) { throw new MojoExecutionException("Error while processing a Markdown file", e); } }  void execute(); void process(File input); @Override boolean accept(File file); @Override boolean fileCreated(File file); @Override boolean fileUpdated(File file); @Override boolean fileDeleted(File file); static final String OUTPUT_EXTENSION; }