Package org.sonar.api.batch.maven

Examples of org.sonar.api.batch.maven.MavenPluginHandler


    eventBus.fireEvent(new InitializersPhaseEvent(Lists.newArrayList(initializers), false));
  }

  private void executeMavenPlugin(Initializer sensor) {
    if (sensor instanceof DependsUponMavenPlugin) {
      MavenPluginHandler handler = ((DependsUponMavenPlugin) sensor).getMavenPluginHandler(project);
      if (handler != null) {
        TimeProfiler profiler = new TimeProfiler(LOG).start("Execute maven plugin " + handler.getArtifactId());
        mavenExecutor.execute(project, fs, handler);
        profiler.stop();
      }
    }
  }
View Full Code Here


    eventBus.fireEvent(new SensorExecutionEvent(sensor, false));
  }

  private void executeMavenPlugin(Sensor sensor) {
    if (sensor instanceof DependsUponMavenPlugin) {
      MavenPluginHandler handler = ((DependsUponMavenPlugin) sensor).getMavenPluginHandler(module);
      if (handler != null) {
        TimeProfiler profiler = new TimeProfiler(LOG).start("Execute maven plugin " + handler.getArtifactId());
        mavenExecutor.execute(module, fs, handler);
        profiler.stop();
      }
    }
  }
View Full Code Here

    }
  }

  private void executeMavenPlugin(PostJob job) {
    if (job instanceof DependsUponMavenPlugin) {
      MavenPluginHandler handler = ((DependsUponMavenPlugin) job).getMavenPluginHandler(project);
      if (handler != null) {
        mavenExecutor.execute(project, fs, handler);
      }
    }
  }
View Full Code Here

    return new MavenPluginsConfigurator(selector);
  }

  @Test
  public void configureHandlers() {
    MavenPluginHandler handler1 = mock(MavenPluginHandler.class);
    when(handler1.getArtifactId()).thenReturn("myartifact1");

    MavenPluginHandler handler2 = mock(MavenPluginHandler.class);
    when(handler2.getArtifactId()).thenReturn("myartifact2");

    Project project = MavenTestUtils.loadProjectFromPom(getClass(), "pom.xml");

    newConfigurator(handler1, handler2).execute(project);
View Full Code Here

        selectedExtensions.add((DependsUponMavenPlugin) extension);
      }
    }
    List<MavenPluginHandler> handlers = Lists.newArrayList();
    for (DependsUponMavenPlugin extension : selectedExtensions) {
      MavenPluginHandler handler = extension.getMavenPluginHandler(project);
      if (handler != null) {
        boolean ok = true;
        if (handler instanceof CheckProject) {
          ok = ((CheckProject) handler).shouldExecuteOnProject(project);
        }
View Full Code Here

TOP

Related Classes of org.sonar.api.batch.maven.MavenPluginHandler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.