use of hudson.maven.MavenModuleSet in project blueocean-plugin by jenkinsci.
the class PipelineApiTest method mavenModulesNoteListed.
@Test
public void mavenModulesNoteListed() throws Exception {
ToolInstallations.configureDefaultMaven("apache-maven-2.2.1", Maven.MavenInstallation.MAVEN_21);
MavenModuleSet m = j.jenkins.createProject(MavenModuleSet.class, "p");
m.setScm(new ExtractResourceSCM(getClass().getResource("maven-multimod.zip")));
assertFalse("MavenModuleSet.isNonRecursive() should be false", m.isNonRecursive());
j.buildAndAssertSuccess(m);
List responses = get("/organizations/jenkins/pipelines/", List.class);
assertEquals(1, responses.size());
assertEquals("p", ((Map) responses.get(0)).get("name"));
}
use of hudson.maven.MavenModuleSet in project sonar-scanner-jenkins by SonarSource.
the class SonarPublisherAdditionalPropertiesSlicerTest method availableMavenProjectsWithSonarPublisher.
@Test
public void availableMavenProjectsWithSonarPublisher() throws IOException {
final MavenModuleSet project = j.jenkins.createProject(MavenModuleSet.class, "random-name");
assertThat(new SonarPublisherAdditionalPropertiesSlicer().getWorkDomain().size()).isZero();
project.getPublishersList().add(new SonarPublisher("MySonar", null, null, "-Dsonar.verbose", null, null, null, null, null, null, false));
assertThat(new SonarPublisherAdditionalPropertiesSlicer().getWorkDomain().size()).isEqualTo(1);
}
use of hudson.maven.MavenModuleSet in project sonar-scanner-jenkins by SonarSource.
the class SonarPublisherAdditionalPropertiesSlicerTest method changeJobAdditionalProperties.
@Test
public void changeJobAdditionalProperties() throws IOException {
final MavenModuleSet project = j.jenkins.createProject(MavenModuleSet.class, "random-name");
project.getPublishersList().add(new SonarPublisher("MySonar", null, null, "-Dsonar.verbose", null, null, null, null, null, null, false));
final SonarPublisherAdditionalPropertiesSlicer.SonarPublisherAdditionalPropertiesSlicerSpec propertiesSpec = new SonarPublisherAdditionalPropertiesSlicer.SonarPublisherAdditionalPropertiesSlicerSpec();
final List<String> values = propertiesSpec.getValues(project);
assertThat(values.get(0)).isEqualTo("-Dsonar.verbose");
final List<String> newValues = new ArrayList<String>();
newValues.add("-Dsonar.showSql");
propertiesSpec.setValues(project, newValues);
final SonarPublisher publisher = project.getPublishersList().get(SonarPublisher.class);
assertThat(publisher.getJobAdditionalProperties()).isEqualTo("-Dsonar.showSql");
}
use of hudson.maven.MavenModuleSet in project sonar-scanner-jenkins by SonarSource.
the class SonarPublisherBranchSlicerTest method availableMavenProjectsWithSonarPublisher.
@Test
public void availableMavenProjectsWithSonarPublisher() throws IOException {
final MavenModuleSet project = j.jenkins.createProject(MavenModuleSet.class, "random-name");
assertThat(new SonarPublisherBranchSlicer().getWorkDomain().size()).isZero();
project.getPublishersList().add(new SonarPublisher("MySonar", null, null, null, null, null, null, null, null, null, false));
assertThat(new SonarPublisherBranchSlicer().getWorkDomain().size()).isEqualTo(1);
}
use of hudson.maven.MavenModuleSet in project sonar-scanner-jenkins by SonarSource.
the class SonarPublisherJdkSlicerTest method availableMavenProjectsWithSonarPublisher.
@Test
public void availableMavenProjectsWithSonarPublisher() throws IOException {
final MavenModuleSet project = j.jenkins.createProject(MavenModuleSet.class, "random-name");
assertThat(new SonarPublisherJdkSlicer().getWorkDomain().size()).isZero();
project.getPublishersList().add(new SonarPublisher("MySonar", null, null, null, null, null, null, null, null, null, false));
assertThat(new SonarPublisherJdkSlicer().getWorkDomain().size()).isEqualTo(1);
}
Aggregations