test_class.declarator: srcDir = new File("src/test/resources/WebsterMojoTest")
test_class.modifier: private final
test_class.original_string: private final File srcDir = new File("src/test/resources/WebsterMojoTest");
test_class.type: File
test_class.var_name: srcDir
test_class.declarator: testOutBaseDir = new File("target/test-out/WebsterMojoTest")
test_class.modifier: private final
test_class.original_string: private final File testOutBaseDir = new File("target/test-out/WebsterMojoTest");
test_class.type: File
test_class.var_name: testOutBaseDir
test_class.file: maven/src/test/java/net/adamcin/oakpal/maven/mojo/WebsterMojoTest.java
test_class.identifier: WebsterMojoTest
test_case.body: @Test
      public void testExecuteWebsterPlan_cleanTempFails() throws Exception {
          final File testOutDir = new File(testOutBaseDir, "testExecuteWebsterPlan_cleanTempFails");
          recursiveDeleteWithRetry(testOutDir);
          final File projectRoot = new File(testOutDir, "content-package");
          FileUtils.copyDirectory(new File(srcDir, "content-package"), projectRoot);
          final WebsterMojo mojo = newMojo();
          final File tempDir = new File(testOutDir, "webster-tmp");
          mojo.websterTempDirectory = tempDir;
          final WebsterPlan.Builder builder = new WebsterPlan.Builder();
          final File segmentStore = new File(testOutDir, "segmentstore");
          builder.withFixtureProvider(() -> JcrFactory.getReadWriteFixture(segmentStore));
          final CompletableFuture<File> globalHome = new CompletableFuture<>();
          withMockTarget(builder, session -> {
              final File tmp = tempDir.listFiles()[0];
              globalHome.complete(tmp);
          });
          mojo.tempDirDeleter = dir -> {
              throw new IOException("OMG I can't tho. Sorry, dir: " + dir.getAbsolutePath());
          };
          mojo.executeWebsterPlan(builder);
          assertTrue("expect log indicating failure to delete global home",
                  logFor(mojo).any(entry -> entry.message.startsWith("Failed to delete temp global")));
      }
test_case.class_method_signature: WebsterMojoTest.testExecuteWebsterPlan_cleanTempFails()
test_case.full_signature: @Test public void testExecuteWebsterPlan_cleanTempFails()
test_case.identifier: testExecuteWebsterPlan_cleanTempFails
test_case.invocations: recursiveDeleteWithRetry copyDirectory newMojo withFixtureProvider getReadWriteFixture withMockTarget listFiles complete getAbsolutePath executeWebsterPlan assertTrue any logFor startsWith
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testExecuteWebsterPlan_cleanTempFails()
focal_class.declarator: PARAM_REPOSITORY_HOME = "webster.repositoryHome"
focal_class.modifier: public static final
focal_class.original_string: public static final String PARAM_REPOSITORY_HOME = "webster.repositoryHome";
focal_class.type: String
focal_class.var_name: PARAM_REPOSITORY_HOME
focal_class.declarator: PARAM_OAK_RUN_ARGS = "webster.oakRunArgs"
focal_class.modifier: public static final
focal_class.original_string: public static final String PARAM_OAK_RUN_ARGS = "webster.oakRunArgs";
focal_class.type: String
focal_class.var_name: PARAM_OAK_RUN_ARGS
focal_class.declarator: PARAM_TMPDIR = "webster.tmpdir"
focal_class.modifier: public static final
focal_class.original_string: public static final String PARAM_TMPDIR = "webster.tmpdir";
focal_class.type: String
focal_class.var_name: PARAM_TMPDIR
focal_class.declarator: websterRepositoryHome
focal_class.modifier: @Parameter(property = PARAM_REPOSITORY_HOME)
focal_class.original_string: @Parameter(property = PARAM_REPOSITORY_HOME)
      File websterRepositoryHome;
focal_class.type: File
focal_class.var_name: websterRepositoryHome
focal_class.declarator: websterOakRunArgs
focal_class.modifier: @Parameter(property = PARAM_OAK_RUN_ARGS)
focal_class.original_string: @Parameter(property = PARAM_OAK_RUN_ARGS)
      String websterOakRunArgs;
focal_class.type: String
focal_class.var_name: websterOakRunArgs
focal_class.declarator: websterTempDirectory
focal_class.modifier: @Parameter(property = PARAM_TMPDIR, defaultValue = "${project.build.directory}/oakpal-plugin/webster-tmpdir")
focal_class.original_string: @Parameter(property = PARAM_TMPDIR, defaultValue = "${project.build.directory}/oakpal-plugin/webster-tmpdir")
      File websterTempDirectory;
focal_class.type: File
focal_class.var_name: websterTempDirectory
focal_class.declarator: websterArchiveRoot
focal_class.modifier: @Parameter(defaultValue = "${basedir}/src/main/content")
focal_class.original_string: @Parameter(defaultValue = "${basedir}/src/main/content")
      File websterArchiveRoot;
focal_class.type: File
focal_class.var_name: websterArchiveRoot
focal_class.declarator: websterTargets
focal_class.modifier: @Parameter
focal_class.original_string: @Parameter
      JsonObject websterTargets;
focal_class.type: JsonObject
focal_class.var_name: websterTargets
focal_class.declarator: revealOakLogging
focal_class.modifier: @Parameter(property = "webster.revealOakLogging")
focal_class.original_string: @Parameter(property = "webster.revealOakLogging")
      boolean revealOakLogging;
focal_class.type: boolean
focal_class.var_name: revealOakLogging
focal_class.declarator: baseDir
focal_class.modifier: @Parameter(defaultValue = "${project.basedir}")
focal_class.original_string: @Parameter(defaultValue = "${project.basedir}")
      File baseDir;
focal_class.type: File
focal_class.var_name: baseDir
focal_class.declarator: tempDirDeleter = FileUtils::deleteDirectory
focal_class.original_string: Fun.ThrowingConsumer<File> tempDirDeleter = FileUtils::deleteDirectory;
focal_class.type: Fun.ThrowingConsumer<File>
focal_class.var_name: tempDirDeleter
focal_class.file: maven/src/main/java/net/adamcin/oakpal/maven/mojo/WebsterMojo.java
focal_class.identifier: WebsterMojo
focal_class.class_method_signature: WebsterMojo.suppressOakLogging(final @NotNull BiConsumer<String, String> propSetter)
focal_class.full_signature:  void suppressOakLogging(final @NotNull BiConsumer<String, String> propSetter)
focal_class.identifier: suppressOakLogging
focal_class.parameters: (final @NotNull BiConsumer<String, String> propSetter)
focal_class.return: void
focal_class.signature: void suppressOakLogging(final @NotNull BiConsumer<String, String> propSetter)
focal_class.class_method_signature: WebsterMojo.addTargets(final @NotNull WebsterPlan.Builder builder,
                      final @NotNull Fun.ThrowingBiFunction<File, JsonObject, List<WebsterTarget>> parser)
focal_class.full_signature:  void addTargets(final @NotNull WebsterPlan.Builder builder,
                      final @NotNull Fun.ThrowingBiFunction<File, JsonObject, List<WebsterTarget>> parser)
focal_class.identifier: addTargets
focal_class.parameters: (final @NotNull WebsterPlan.Builder builder,
                      final @NotNull Fun.ThrowingBiFunction<File, JsonObject, List<WebsterTarget>> parser)
focal_class.return: void
focal_class.signature: void addTargets(final @NotNull WebsterPlan.Builder builder,
                      final @NotNull Fun.ThrowingBiFunction<File, JsonObject, List<WebsterTarget>> parser)
focal_class.class_method_signature: WebsterMojo.getFixtureProvider()
focal_class.full_signature: @Nullable WebsterPlan.FixtureProvider getFixtureProvider()
focal_class.identifier: getFixtureProvider
focal_class.modifiers: @Nullable
focal_class.parameters: ()
focal_class.return: WebsterPlan.FixtureProvider
focal_class.signature: WebsterPlan.FixtureProvider getFixtureProvider()
focal_class.class_method_signature: WebsterMojo.executeWebsterPlan(final @NotNull WebsterPlan.Builder builder)
focal_class.full_signature:  void executeWebsterPlan(final @NotNull WebsterPlan.Builder builder)
focal_class.identifier: executeWebsterPlan
focal_class.parameters: (final @NotNull WebsterPlan.Builder builder)
focal_class.return: void
focal_class.signature: void executeWebsterPlan(final @NotNull WebsterPlan.Builder builder)
focal_class.class_method_signature: WebsterMojo.execute()
focal_class.full_signature: @Override public final void execute()
focal_class.identifier: execute
focal_class.modifiers: @Override public final
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void execute()
focal_class.superclass: extends AbstractMojo
focal_method.body: void executeWebsterPlan(final @NotNull WebsterPlan.Builder builder) throws MojoFailureException {
          try {
              websterTempDirectory.mkdirs();
              final File globalRepositoryHome = Files
                      .createTempDirectory(websterTempDirectory.toPath(), "webster_repository")
                      .toFile().getAbsoluteFile();
  
              try {
                  WebsterPlan plan = builder
                          .withGlobalSegmentStore(new File(globalRepositoryHome, "segmentstore")).build();
                  plan.perform();
              } catch (Exception e) {
                  throw new MojoFailureException("Failed to execute Webster plan.", e);
              } finally {
                  try {
                      tempDirDeleter.tryAccept(globalRepositoryHome);
                  } catch (Exception e) {
                      getLog().error("Failed to delete temp global segment store: "
                              + globalRepositoryHome.getAbsolutePath(), e);
                  }
              }
          } catch (IOException e) {
              throw new MojoFailureException("Failed to create temp global segment store", e);
          }
      }
focal_method.class_method_signature: WebsterMojo.executeWebsterPlan(final @NotNull WebsterPlan.Builder builder)
focal_method.full_signature:  void executeWebsterPlan(final @NotNull WebsterPlan.Builder builder)
focal_method.identifier: executeWebsterPlan
focal_method.invocations: mkdirs getAbsoluteFile toFile createTempDirectory toPath build withGlobalSegmentStore perform tryAccept error getLog getAbsolutePath
focal_method.parameters: (final @NotNull WebsterPlan.Builder builder)
focal_method.return: void
focal_method.signature: void executeWebsterPlan(final @NotNull WebsterPlan.Builder builder)