@Test public void testExecute() throws Exception { final File testOutDir = new File(testOutBaseDir, "testExecute"); FileUtils.deleteDirectory(testOutDir); final File projectRoot = new File(testOutDir, "content-package"); FileUtils.copyDirectory(new File(srcDir, "content-package"), projectRoot); WebsterMojo mojo = newMojo(); final File archiveRoot = new File(projectRoot, "src/main/content"); final File tempDir = new File(testOutDir, "webster-tmp"); mojo.baseDir = projectRoot; mojo.websterTempDirectory = tempDir; mojo.websterArchiveRoot = archiveRoot; mojo.websterTargets = obj().key("nodetypes", obj()).key("privileges", obj()).get(); mojo.websterOakRunArgs = "memory"; mojo.execute(); assertTrue("expect nodetypes", new File(archiveRoot, "META-INF/vault/nodetypes.cnd").exists()); assertTrue("expect privileges", new File(archiveRoot, "META-INF/vault/privileges.xml").exists()); }
@Override public final void execute() throws MojoFailureException { WebsterPlan.Builder builder = new WebsterPlan.Builder(); builder.withArchiveRoot(websterArchiveRoot.getAbsoluteFile()); suppressOakLogging(System::setProperty); if (websterTargets == null || websterTargets.isEmpty()) { getLog().info("No websterTargets configuration found in plugin configuration. skipping webster execution."); return; } addTargets(builder, JsonTargetFactory::fromJsonHintMap); WebsterPlan.FixtureProvider fixtureProvider = getFixtureProvider(); if (fixtureProvider == null) { getLog().info("No source Oak repository provided. skipping webster execution."); return; } builder.withFixtureProvider(fixtureProvider); executeWebsterPlan(builder); }
WebsterMojo extends AbstractMojo { @Override public final void execute() throws MojoFailureException { WebsterPlan.Builder builder = new WebsterPlan.Builder(); builder.withArchiveRoot(websterArchiveRoot.getAbsoluteFile()); suppressOakLogging(System::setProperty); if (websterTargets == null || websterTargets.isEmpty()) { getLog().info("No websterTargets configuration found in plugin configuration. skipping webster execution."); return; } addTargets(builder, JsonTargetFactory::fromJsonHintMap); WebsterPlan.FixtureProvider fixtureProvider = getFixtureProvider(); if (fixtureProvider == null) { getLog().info("No source Oak repository provided. skipping webster execution."); return; } builder.withFixtureProvider(fixtureProvider); executeWebsterPlan(builder); } }
WebsterMojo extends AbstractMojo { @Override public final void execute() throws MojoFailureException { WebsterPlan.Builder builder = new WebsterPlan.Builder(); builder.withArchiveRoot(websterArchiveRoot.getAbsoluteFile()); suppressOakLogging(System::setProperty); if (websterTargets == null || websterTargets.isEmpty()) { getLog().info("No websterTargets configuration found in plugin configuration. skipping webster execution."); return; } addTargets(builder, JsonTargetFactory::fromJsonHintMap); WebsterPlan.FixtureProvider fixtureProvider = getFixtureProvider(); if (fixtureProvider == null) { getLog().info("No source Oak repository provided. skipping webster execution."); return; } builder.withFixtureProvider(fixtureProvider); executeWebsterPlan(builder); }  }
WebsterMojo extends AbstractMojo { @Override public final void execute() throws MojoFailureException { WebsterPlan.Builder builder = new WebsterPlan.Builder(); builder.withArchiveRoot(websterArchiveRoot.getAbsoluteFile()); suppressOakLogging(System::setProperty); if (websterTargets == null || websterTargets.isEmpty()) { getLog().info("No websterTargets configuration found in plugin configuration. skipping webster execution."); return; } addTargets(builder, JsonTargetFactory::fromJsonHintMap); WebsterPlan.FixtureProvider fixtureProvider = getFixtureProvider(); if (fixtureProvider == null) { getLog().info("No source Oak repository provided. skipping webster execution."); return; } builder.withFixtureProvider(fixtureProvider); executeWebsterPlan(builder); }  @Override final void execute(); }
WebsterMojo extends AbstractMojo { @Override public final void execute() throws MojoFailureException { WebsterPlan.Builder builder = new WebsterPlan.Builder(); builder.withArchiveRoot(websterArchiveRoot.getAbsoluteFile()); suppressOakLogging(System::setProperty); if (websterTargets == null || websterTargets.isEmpty()) { getLog().info("No websterTargets configuration found in plugin configuration. skipping webster execution."); return; } addTargets(builder, JsonTargetFactory::fromJsonHintMap); WebsterPlan.FixtureProvider fixtureProvider = getFixtureProvider(); if (fixtureProvider == null) { getLog().info("No source Oak repository provided. skipping webster execution."); return; } builder.withFixtureProvider(fixtureProvider); executeWebsterPlan(builder); }  @Override final void execute(); static final String PARAM_REPOSITORY_HOME; static final String PARAM_OAK_RUN_ARGS; static final String PARAM_TMPDIR; }