Search in sources :

Example 6 with Plugin

use of com.willowtreeapps.hyperion.plugin.v1.Plugin 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);
}
Also used : MavenProject(org.sonar.maven.model.maven2.MavenProject) Configuration(org.sonar.maven.model.maven2.PluginExecution.Configuration) Element(org.w3c.dom.Element) Plugin(org.sonar.maven.model.maven2.Plugin) Test(org.junit.Test)

Aggregations

ArrayList (java.util.ArrayList)4 Plugin (co.cask.cdap.etl.proto.v1.Plugin)3 Test (org.junit.Test)3 Resources (co.cask.cdap.api.Resources)2 ArtifactSelectorConfig (co.cask.cdap.etl.proto.ArtifactSelectorConfig)2 Connection (co.cask.cdap.etl.proto.Connection)2 UpgradeContext (co.cask.cdap.etl.proto.UpgradeContext)2 WorkerThread (android.support.annotation.WorkerThread)1 Plugin (com.willowtreeapps.hyperion.plugin.v1.Plugin)1 PluginModule (com.willowtreeapps.hyperion.plugin.v1.PluginModule)1 ComChannelType (eu.europa.ec.fisheries.schema.mobileterminal.types.v1.ComChannelType)1 MobileTerminalAttribute (eu.europa.ec.fisheries.schema.mobileterminal.types.v1.MobileTerminalAttribute)1 MobileTerminalId (eu.europa.ec.fisheries.schema.mobileterminal.types.v1.MobileTerminalId)1 MobileTerminalType (eu.europa.ec.fisheries.schema.mobileterminal.types.v1.MobileTerminalType)1 Plugin (eu.europa.ec.fisheries.schema.mobileterminal.types.v1.Plugin)1 Map (java.util.Map)1 HttpResponse (org.apache.http.HttpResponse)1 MavenProject (org.sonar.maven.model.maven2.MavenProject)1 Plugin (org.sonar.maven.model.maven2.Plugin)1 Configuration (org.sonar.maven.model.maven2.PluginExecution.Configuration)1