aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api/src
diff options
context:
space:
mode:
authorJulien HENRY <julien.henry@sonarsource.com>2013-06-24 11:53:07 +0200
committerJulien HENRY <julien.henry@sonarsource.com>2013-06-24 12:09:16 +0200
commit08ce13911a8cd0ee89184f98bcc07597d01ecf35 (patch)
treed47106119a4b4a4b32aef55bb22b23e3ab32e047 /sonar-plugin-api/src
parent7c3abd3f7749ab7c332da92965f131d4ae80b178 (diff)
downloadsonarqube-08ce13911a8cd0ee89184f98bcc07597d01ecf35.tar.gz
sonarqube-08ce13911a8cd0ee89184f98bcc07597d01ecf35.zip
SONAR-4433 New ProjectBootstrapper extension point
Diffstat (limited to 'sonar-plugin-api/src')
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/batch/bootstrap/ProjectBootstrapper.java45
1 files changed, 45 insertions, 0 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/bootstrap/ProjectBootstrapper.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/bootstrap/ProjectBootstrapper.java
new file mode 100644
index 00000000000..bc90921ebdb
--- /dev/null
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/bootstrap/ProjectBootstrapper.java
@@ -0,0 +1,45 @@
+/*
+ * SonarQube, open source software quality management tool.
+ * Copyright (C) 2008-2013 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.task.TaskExtension;
+
+/**
+ * This extension point allows to define project structure at runtime. It is executed once during task startup.
+ * Some use-cases :
+ * <ul>
+ * <li>Maven bootstraper create project structure from pom.xml</li>
+ * <li>Sonar Runner bootstraper create project structure from sonar-runner.properties</li>
+ * </ul>
+ * Only one ProjectBootstrapper is allowed per environement.
+ *
+ * @since 3.7
+ */
+public abstract class ProjectBootstrapper implements TaskExtension {
+
+ protected ProjectBootstrapper() {
+ }
+
+ /**
+ * Implement this method to create project reactor
+ */
+ public abstract ProjectReactor bootstrap();
+
+}