// only static stuff
}
- public static Collection<Object> all(GlobalMode analysisMode) {
+ public static Collection<Object> all() {
List<Object> components = Lists.newArrayList(
DefaultResourceTypes.get(),
// SCM
private final PluginRepository pluginRepository;
private final EnvironmentInformation env;
- private final GlobalMode globalMode;
- public ExtensionInstaller(PluginRepository pluginRepository, EnvironmentInformation env, GlobalMode globalMode) {
+ public ExtensionInstaller(PluginRepository pluginRepository, EnvironmentInformation env) {
this.pluginRepository = pluginRepository;
this.env = env;
- this.globalMode = globalMode;
}
public ExtensionInstaller install(ComponentContainer container, ExtensionMatcher matcher) {
// core components
- for (Object o : BatchComponents.all(globalMode)) {
+ for (Object o : BatchComponents.all()) {
doInstall(container, matcher, null, o);
}
import org.apache.commons.io.FileUtils;
import org.sonar.batch.analysis.AnalysisProperties;
import org.picocontainer.injectors.ProviderAdapter;
-import org.sonar.api.batch.bootstrap.ProjectBootstrapper;
import org.sonar.api.batch.bootstrap.ProjectReactor;
-import javax.annotation.Nullable;
-
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
public class MutableProjectReactorProvider extends ProviderAdapter {
-
- private final ProjectBootstrapper projectBootstrapper;
private ProjectReactor reactor = null;
- public MutableProjectReactorProvider(@Nullable ProjectBootstrapper projectBootstrapper) {
- this.projectBootstrapper = projectBootstrapper;
- }
-
public ProjectReactor provide(ProjectReactorBuilder builder, AnalysisProperties settings) {
if (reactor == null) {
- // Look for a deprecated custom ProjectBootstrapper for old versions of SQ Runner
- if (projectBootstrapper == null
- // Starting from Maven plugin 2.3 then only DefaultProjectBootstrapper should be used.
- || "true".equals(settings.property("sonar.mojoUseRunner"))) {
- // Use default SonarRunner project bootstrapper
- reactor = builder.execute();
- } else {
- reactor = projectBootstrapper.bootstrap();
- }
- if (reactor == null) {
- throw new IllegalStateException(projectBootstrapper + " has returned null as ProjectReactor");
- }
+ reactor = builder.execute();
cleanDirectory(reactor.getRoot().getWorkDir());
}
return reactor;
import com.google.common.annotations.VisibleForTesting;
import org.sonar.api.CoreProperties;
import org.sonar.api.batch.InstantiationStrategy;
-import org.sonar.api.batch.bootstrap.ProjectBootstrapper;
import org.sonar.api.config.Settings;
import org.sonar.api.resources.Languages;
import org.sonar.api.resources.Project;
props,
DefaultAnalysisMode.class,
projectReactorBuilder(),
- new MutableProjectReactorProvider(getComponentByType(ProjectBootstrapper.class)),
+ new MutableProjectReactorProvider(),
new ImmutableProjectReactorProvider(),
ProjectBuildersExecutor.class,
ProjectLock.class,
+++ /dev/null
-/*
- * SonarQube, open source software quality management tool.
- * Copyright (C) 2008-2014 SonarSource
- * mailto:contact AT sonarsource DOT com
- *
- * SonarQube is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * SonarQube is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-package org.sonar.api.batch.bootstrap;
-
-import org.sonar.api.batch.BatchSide;
-import org.sonar.api.ExtensionPoint;
-
-/**
- * This extension point initializes the project structure. It is extended by batch bootstrappers
- * like sonar-runner or Maven plugin. It is not supposed to be used by standard plugins (.NET, ...).
- * Some use-cases :
- * <ul>
- * <li>Maven Plugins defines project structure from pom.xml</li>
- * <li>Sonar Runner defines project from sonar-runner.properties</li>
- * </ul>
- * Only one instance is allowed per environment.
- *
- * @since 3.7
- * @deprecated since 4.3 All bootstrappers should use SQ Runner API and provide a set of properties
- */
-@Deprecated
-@BatchSide
-@ExtensionPoint
-public interface ProjectBootstrapper {
-
- /**
- * Implement this method to create project reactor
- */
- ProjectReactor bootstrap();
-
-}