Package org.sonar.api.batch.bootstrap

Examples of org.sonar.api.batch.bootstrap.ProjectBootstrapper


  private void projectBootstrap() {
    // Views pass a custom ProjectReactor
    ProjectReactor reactor = getComponentByType(ProjectReactor.class);
    if (reactor == null) {
      // OK, not present, so look for a deprecated custom ProjectBootstrapper for old versions of SQ Runner
      ProjectBootstrapper bootstrapper = getComponentByType(ProjectBootstrapper.class);
      Settings settings = getComponentByType(Settings.class);
      if (bootstrapper == null
        // Starting from Maven plugin 2.3 then only DefaultProjectBootstrapper should be used.
        || "true".equals(settings.getString("sonar.mojoUseRunner"))) {
        // Use default SonarRunner project bootstrapper
        ProjectReactorBuilder builder = getComponentByType(ProjectReactorBuilder.class);
        reactor = builder.execute();
      } else {
        reactor = bootstrapper.bootstrap();
      }
      if (reactor == null) {
        throw new SonarException(bootstrapper + " has returned null as ProjectReactor");
      }
      add(reactor);
View Full Code Here


    }
  }

  private void projectBootstrap() {
    ProjectReactor reactor;
    ProjectBootstrapper bootstrapper = getComponentByType(ProjectBootstrapper.class);
    Settings settings = getComponentByType(Settings.class);
    if (bootstrapper == null
      // Starting from Maven plugin 2.3 then only DefaultProjectBootstrapper should be used.
      || "true".equals(settings.getString("sonar.mojoUseRunner"))) {
      // Use default SonarRunner project bootstrapper
      ProjectReactorBuilder builder = getComponentByType(ProjectReactorBuilder.class);
      reactor = builder.execute();
    } else {
      reactor = bootstrapper.bootstrap();
    }
    if (reactor == null) {
      throw new IllegalStateException(bootstrapper + " has returned null as ProjectReactor");
    }
    add(reactor);
View Full Code Here

TOP

Related Classes of org.sonar.api.batch.bootstrap.ProjectBootstrapper

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.