use of org.sonar.maven.model.maven2.PluginExecution.Configuration in project sonar-java by SonarSource.
the class PomParserTest method should_parse_incompletly_pom_with_complex_elements.
@Test
public void should_parse_incompletly_pom_with_complex_elements() throws Exception {
MavenProject project = PomParser.parseXML(COMPLEX_ELEMENT_POM_FILE);
Configuration config = project.getBuild().getPlugins().getPlugins().get(0).getExecutions().getExecutions().get(0).getConfiguration();
checkPosition(config, 16, 13, 24, 13);
assertThat(config).isNotNull();
List<Element> values = config.getElements();
assertThat(values).hasSize(2);
}
use of org.sonar.maven.model.maven2.PluginExecution.Configuration in project sonar-java by SonarSource.
the class PomParserTest method should_retrieve_configurations.
@Test
public void should_retrieve_configurations() throws Exception {
MavenProject project = PomParser.parseXML(SIMPLE_POM_FILE);
List<Plugin> plugins = project.getBuild().getPlugins().getPlugins();
Configuration configuration = plugins.get(0).getExecutions().getExecutions().get(0).getConfiguration();
checkPosition(configuration, 88, 13, 90, 13);
List<Element> values = configuration.getElements();
assertThat(values).hasSize(1);
}
Aggregations