use of hudson.maven.MavenModuleSet in project sonar-scanner-jenkins by SonarSource.
the class SonarTestCase method setupSonarMavenProject.
protected MavenModuleSet setupSonarMavenProject(String pomName) throws Exception {
final MavenModuleSet project = j.jenkins.createProject(MavenModuleSet.class, "MavenProject");
// Setup SCM
project.setScm(new SingleFileSCM(pomName, getClass().getResource("/hudson/plugins/sonar/SonarTestCase/pom.xml")));
// Setup Maven
project.setRootPOM(pomName);
project.setGoals("clean install");
project.setIsArchivingDisabled(true);
// Setup Sonar
project.getPublishersList().add(newSonarPublisherForMavenProject());
return project;
}
use of hudson.maven.MavenModuleSet in project sonar-scanner-jenkins by SonarSource.
the class BaseTest method testMavenProject.
/**
* Maven Project.
* <ul>
* <li>SONARPLUGINS-19: Maven "-B" option (batch mode)</li>
* <li>SONARPLUGINS-73: Root POM</li>
* <li>SONARPLUGINS-101: Private Repository</li>
* <li>SONARPLUGINS-253: Maven "-e" option</li>
* <li>SONARPLUGINS-263: Path to POM with spaces</li>
* <li>SONARPLUGINS-326: Use alternate settings file</li>
* </ul>
*
* @throws Exception if something is wrong
*/
@Test
public void testMavenProject() throws Exception {
configureDefaultMaven();
configureDefaultSonar();
String pomName = "space test/root-pom.xml";
MavenModuleSet project = setupSonarMavenProject(pomName);
project.setAlternateSettings("/settings.xml");
project.setLocalRepository(new PerJobLocalRepositoryLocator());
Run<?, ?> build = build(project);
}
Aggregations