@Test(expected = MojoFailureException.class) public void testAddTargets_throws() throws Exception { WebsterMojo mojo = newMojo(); mojo.baseDir = new File("."); mojo.websterTargets = obj().get(); mojo.addTargets(new WebsterPlan.Builder(), (baseDir, targets) -> { throw new IOException("failed yo"); }); }
void addTargets(final @NotNull WebsterPlan.Builder builder, final @NotNull Fun.ThrowingBiFunction<File, JsonObject, List<WebsterTarget>> parser) throws MojoFailureException { try { builder.withTargets(parser.tryApply(baseDir, websterTargets)); } catch (Exception e) { throw new MojoFailureException("Failed to parse websterTargets", e); } }
WebsterMojo extends AbstractMojo { void addTargets(final @NotNull WebsterPlan.Builder builder, final @NotNull Fun.ThrowingBiFunction<File, JsonObject, List<WebsterTarget>> parser) throws MojoFailureException { try { builder.withTargets(parser.tryApply(baseDir, websterTargets)); } catch (Exception e) { throw new MojoFailureException("Failed to parse websterTargets", e); } } }
WebsterMojo extends AbstractMojo { void addTargets(final @NotNull WebsterPlan.Builder builder, final @NotNull Fun.ThrowingBiFunction<File, JsonObject, List<WebsterTarget>> parser) throws MojoFailureException { try { builder.withTargets(parser.tryApply(baseDir, websterTargets)); } catch (Exception e) { throw new MojoFailureException("Failed to parse websterTargets", e); } }  }
WebsterMojo extends AbstractMojo { void addTargets(final @NotNull WebsterPlan.Builder builder, final @NotNull Fun.ThrowingBiFunction<File, JsonObject, List<WebsterTarget>> parser) throws MojoFailureException { try { builder.withTargets(parser.tryApply(baseDir, websterTargets)); } catch (Exception e) { throw new MojoFailureException("Failed to parse websterTargets", e); } }  @Override final void execute(); }
WebsterMojo extends AbstractMojo { void addTargets(final @NotNull WebsterPlan.Builder builder, final @NotNull Fun.ThrowingBiFunction<File, JsonObject, List<WebsterTarget>> parser) throws MojoFailureException { try { builder.withTargets(parser.tryApply(baseDir, websterTargets)); } catch (Exception e) { throw new MojoFailureException("Failed to parse websterTargets", e); } }  @Override final void execute(); static final String PARAM_REPOSITORY_HOME; static final String PARAM_OAK_RUN_ARGS; static final String PARAM_TMPDIR; }