use of org.jenkinsci.test.acceptance.plugins.maven.MavenModuleSet in project acceptance-test-harness by jenkinsci.
the class MavenPluginTest method useWithTasks.
@Issue("JENKINS-22252")
@WithPlugins({ "maven-plugin@2.12", "tasks" })
@Test
public void useWithTasks() throws InterruptedException {
MavenInstallation.installMaven(jenkins, "Maven 3.2.x", "3.2.1");
MavenModuleSet job = jenkins.jobs.create(MavenModuleSet.class);
job.configure();
job.copyDir(resource("/maven_plugin/multimodule/"));
job.goals.set("package");
job.addBuildSettings(TasksMavenSettings.class);
job.save();
Build build = job.startBuild().shouldSucceed();
assertThat(build.getConsole(), not(containsString("IllegalAccessError")));
}
use of org.jenkinsci.test.acceptance.plugins.maven.MavenModuleSet in project acceptance-test-harness by jenkinsci.
the class CheckStylePluginTest method should_group_warnings_by_module.
/**
* Builds a multi-module maven project and checks that warnings are grouped by module.
*/
// TODO: Check module details
@Test
public void should_group_warnings_by_module() {
MavenModuleSet job = createMavenJob(CHECKSTYLE_PLUGIN_ROOT + "maven_multi_module", "clean package checkstyle:checkstyle", CheckStyleMavenSettings.class, new NullConfigurator<>());
Node slave = createSlaveForJob(job);
Build build = buildSuccessfulJobOnSlave(job, slave);
assertThatCheckStyleResultExists(job, build);
build.open();
CheckStyleAction checkstyle = new CheckStyleAction(build);
checkstyle.open();
assertThat(checkstyle.getNumberOfNewWarnings(), is(24));
assertThatModulesTabIsCorrectlyFilled(checkstyle);
}
Aggregations