diff options
author | Sébastien Lesaint <sebastien.lesaint@sonarsource.com> | 2016-02-22 16:25:20 +0100 |
---|---|---|
committer | Sébastien Lesaint <sebastien.lesaint@sonarsource.com> | 2016-02-24 15:54:03 +0100 |
commit | 1c92c5671fd74619609c0ab9b6a510ebd1876b6e (patch) | |
tree | d7f958b45e3ece52c6ab08ff2855239dc19cef12 | |
parent | 9c6d5afbd211792c73c51e51afa02133107bf405 (diff) | |
download | sonarqube-1c92c5671fd74619609c0ab9b6a510ebd1876b6e.tar.gz sonarqube-1c92c5671fd74619609c0ab9b6a510ebd1876b6e.zip |
add module sonar-governance-bridge
-rw-r--r-- | pom.xml | 5 | ||||
-rw-r--r-- | server/pom.xml | 1 | ||||
-rw-r--r-- | server/sonar-governance-bridge/pom.xml | 41 | ||||
-rw-r--r-- | server/sonar-governance-bridge/src/main/java/org/sonar/server/governance/GovernanceBridge.java | 44 | ||||
-rw-r--r-- | server/sonar-governance-bridge/src/main/java/org/sonar/server/governance/package-info.java | 23 |
5 files changed, 114 insertions, 0 deletions
@@ -529,6 +529,11 @@ <version>${project.version}</version> </dependency> <dependency> + <groupId>org.sonarsource.sonarqube</groupId> + <artifactId>sonar-governance-bridge</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> <groupId>org.sonarsource.java</groupId> <artifactId>sonar-java-plugin</artifactId> <version>${sonarJava.version}</version> diff --git a/server/pom.xml b/server/pom.xml index 6537d24e682..9046963b34d 100644 --- a/server/pom.xml +++ b/server/pom.xml @@ -17,6 +17,7 @@ <module>sonar-server</module> <module>sonar-views-bridge</module> <module>sonar-dev-cockpit-bridge</module> + <module>sonar-governance-bridge</module> <module>sonar-web</module> <module>sonar-server-benchmarks</module> </modules> diff --git a/server/sonar-governance-bridge/pom.xml b/server/sonar-governance-bridge/pom.xml new file mode 100644 index 00000000000..3c49da1690e --- /dev/null +++ b/server/sonar-governance-bridge/pom.xml @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.sonarsource.sonarqube</groupId> + <artifactId>server</artifactId> + <version>5.5-SNAPSHOT</version> + <relativePath>..</relativePath> + </parent> + <artifactId>sonar-governance-bridge</artifactId> + <name>SonarQube :: Governance Bridge</name> + + <dependencies> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>sonar-plugin-api</artifactId> + </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>sonar-core</artifactId> + </dependency> + <dependency> + <groupId>com.google.code.findbugs</groupId> + <artifactId>jsr305</artifactId> + <scope>provided</scope> + </dependency> + </dependencies> + + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-surefire-plugin</artifactId> + <configuration> + <skipTests>${skipServerTests}</skipTests> + </configuration> + </plugin> + </plugins> + </build> + +</project> diff --git a/server/sonar-governance-bridge/src/main/java/org/sonar/server/governance/GovernanceBridge.java b/server/sonar-governance-bridge/src/main/java/org/sonar/server/governance/GovernanceBridge.java new file mode 100644 index 00000000000..03c3e633383 --- /dev/null +++ b/server/sonar-governance-bridge/src/main/java/org/sonar/server/governance/GovernanceBridge.java @@ -0,0 +1,44 @@ +/* + * SonarQube + * Copyright (C) 2009-2016 SonarSource SA + * mailto:contact AT sonarsource DOT com + * + * This program 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. + * + * This program 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.server.governance; + +import org.sonar.core.platform.ComponentContainer; + +/** + * Interface implemented by the Extension point exposed by the Governance plugin that serves as the unique access point from + * the whole SQ instance into the Governance plugin. + */ +public interface GovernanceBridge { + + /** + * Bootstraps the Governance plugin. + * + * @param parent the parent ComponentContainer which provides Platform components for Governance to use. + * + * @throws IllegalStateException if called more than once + */ + void startGovernance(ComponentContainer parent); + + /** + * This method is called when Platform is shutting down. + */ + void stopGovernance(); + +} diff --git a/server/sonar-governance-bridge/src/main/java/org/sonar/server/governance/package-info.java b/server/sonar-governance-bridge/src/main/java/org/sonar/server/governance/package-info.java new file mode 100644 index 00000000000..17c8c94552d --- /dev/null +++ b/server/sonar-governance-bridge/src/main/java/org/sonar/server/governance/package-info.java @@ -0,0 +1,23 @@ +/* + * SonarQube + * Copyright (C) 2009-2016 SonarSource SA + * mailto:contact AT sonarsource DOT com + * + * This program 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. + * + * This program 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. + */ +@ParametersAreNonnullByDefault +package org.sonar.server.governance; + +import javax.annotation.ParametersAreNonnullByDefault; |