@Test public void throwsMojoException_whenSearchPlatformCannotBeConstructed() throws Exception { Mojo mojo = rule.lookupMojo("evaluate", "src/test/resources/evaluateMojoTests/searchplatform_args_constructor_pom.xml"); assertNotNull(mojo); try { mojo.execute(); fail("Expected MojoExecutionException"); } catch (MojoExecutionException e) { assertTrue(e.getCause() instanceof InstantiationException); } }
@Override public void execute() throws MojoExecutionException { try (final SearchPlatform platform = buildSearchPlatform()) { final MetricClassManager metricClassManager = MetricClassConfigurationManager.getInstance() .setDefaultMaximumGrade(maximumGrade) .setDefaultMissingGrade(missingGrade) .buildMetricClassManager(metrics, parameterizedMetrics); final Engine engine = new Engine( platform, configurationsFolder, corporaFolder, ratingsFolder, templatesFolder, metricClassManager, fields.split(","), exclude, include, checksumFile, persistence, evaluation); engine.evaluate(searchPlatformConfiguration); } catch (final IOException exception) { throw new MojoExecutionException(exception.getMessage(), exception); } }
RREvaluateMojo extends AbstractMojo { @Override public void execute() throws MojoExecutionException { try (final SearchPlatform platform = buildSearchPlatform()) { final MetricClassManager metricClassManager = MetricClassConfigurationManager.getInstance() .setDefaultMaximumGrade(maximumGrade) .setDefaultMissingGrade(missingGrade) .buildMetricClassManager(metrics, parameterizedMetrics); final Engine engine = new Engine( platform, configurationsFolder, corporaFolder, ratingsFolder, templatesFolder, metricClassManager, fields.split(","), exclude, include, checksumFile, persistence, evaluation); engine.evaluate(searchPlatformConfiguration); } catch (final IOException exception) { throw new MojoExecutionException(exception.getMessage(), exception); } } }
RREvaluateMojo extends AbstractMojo { @Override public void execute() throws MojoExecutionException { try (final SearchPlatform platform = buildSearchPlatform()) { final MetricClassManager metricClassManager = MetricClassConfigurationManager.getInstance() .setDefaultMaximumGrade(maximumGrade) .setDefaultMissingGrade(missingGrade) .buildMetricClassManager(metrics, parameterizedMetrics); final Engine engine = new Engine( platform, configurationsFolder, corporaFolder, ratingsFolder, templatesFolder, metricClassManager, fields.split(","), exclude, include, checksumFile, persistence, evaluation); engine.evaluate(searchPlatformConfiguration); } catch (final IOException exception) { throw new MojoExecutionException(exception.getMessage(), exception); } }  }
RREvaluateMojo extends AbstractMojo { @Override public void execute() throws MojoExecutionException { try (final SearchPlatform platform = buildSearchPlatform()) { final MetricClassManager metricClassManager = MetricClassConfigurationManager.getInstance() .setDefaultMaximumGrade(maximumGrade) .setDefaultMissingGrade(missingGrade) .buildMetricClassManager(metrics, parameterizedMetrics); final Engine engine = new Engine( platform, configurationsFolder, corporaFolder, ratingsFolder, templatesFolder, metricClassManager, fields.split(","), exclude, include, checksumFile, persistence, evaluation); engine.evaluate(searchPlatformConfiguration); } catch (final IOException exception) { throw new MojoExecutionException(exception.getMessage(), exception); } }  @Override void execute(); }
RREvaluateMojo extends AbstractMojo { @Override public void execute() throws MojoExecutionException { try (final SearchPlatform platform = buildSearchPlatform()) { final MetricClassManager metricClassManager = MetricClassConfigurationManager.getInstance() .setDefaultMaximumGrade(maximumGrade) .setDefaultMissingGrade(missingGrade) .buildMetricClassManager(metrics, parameterizedMetrics); final Engine engine = new Engine( platform, configurationsFolder, corporaFolder, ratingsFolder, templatesFolder, metricClassManager, fields.split(","), exclude, include, checksumFile, persistence, evaluation); engine.evaluate(searchPlatformConfiguration); } catch (final IOException exception) { throw new MojoExecutionException(exception.getMessage(), exception); } }  @Override void execute();  }