diff options
author | Julien HENRY <julien.henry@sonarsource.com> | 2015-01-27 10:50:00 +0100 |
---|---|---|
committer | Julien HENRY <julien.henry@sonarsource.com> | 2015-01-27 17:41:04 +0100 |
commit | edb5e139309f4ce46a9dcd30813ae7a56b9761a1 (patch) | |
tree | 492317efaee78eee8f52f5e5e6cc50aa6139a437 /sonar-application | |
parent | 746d948321ab881fe0e6d907db43b2d69877509c (diff) | |
download | sonarqube-edb5e139309f4ce46a9dcd30813ae7a56b9761a1.tar.gz sonarqube-edb5e139309f4ce46a9dcd30813ae7a56b9761a1.zip |
SONAR-6088 Remove old preview/h2 mode
Diffstat (limited to 'sonar-application')
-rw-r--r-- | sonar-application/assembly.xml | 8 | ||||
-rw-r--r-- | sonar-application/pom.xml | 5 | ||||
-rw-r--r-- | sonar-application/src/main/java/org/sonar/application/JdbcSettings.java | 14 |
3 files changed, 16 insertions, 11 deletions
diff --git a/sonar-application/assembly.xml b/sonar-application/assembly.xml index 17ff70213c6..3773b757155 100644 --- a/sonar-application/assembly.xml +++ b/sonar-application/assembly.xml @@ -143,6 +143,14 @@ <unpack>false</unpack> <scope>provided</scope> </dependencySet> + <dependencySet> + <outputDirectory>lib/jdbc/h2/</outputDirectory> + <includes> + <include>com.h2database:h2</include> + </includes> + <unpack>false</unpack> + <scope>provided</scope> + </dependencySet> <!-- Java Service Wrapper --> <dependencySet> <outputDirectory>bin</outputDirectory> diff --git a/sonar-application/pom.xml b/sonar-application/pom.xml index 4a21e030492..98dec35edfe 100644 --- a/sonar-application/pom.xml +++ b/sonar-application/pom.xml @@ -82,6 +82,11 @@ <artifactId>jtds</artifactId> <scope>provided</scope> </dependency> + <dependency> + <groupId>com.h2database</groupId> + <artifactId>h2</artifactId> + <scope>provided</scope> + </dependency> <!-- core plugins --> <dependency> diff --git a/sonar-application/src/main/java/org/sonar/application/JdbcSettings.java b/sonar-application/src/main/java/org/sonar/application/JdbcSettings.java index 4a34e55a642..c949b1fae45 100644 --- a/sonar-application/src/main/java/org/sonar/application/JdbcSettings.java +++ b/sonar-application/src/main/java/org/sonar/application/JdbcSettings.java @@ -26,8 +26,6 @@ import org.sonar.process.MessageException; import org.sonar.process.ProcessConstants; import org.sonar.process.Props; -import javax.annotation.CheckForNull; -import javax.annotation.Nullable; import java.io.File; import java.util.ArrayList; import java.util.List; @@ -37,12 +35,12 @@ import java.util.regex.Pattern; public class JdbcSettings { static enum Provider { - H2(null), JTDS("lib/jdbc/jtds"), MYSQL("lib/jdbc/mysql"), ORACLE("extensions/jdbc-driver/oracle"), + H2("lib/jdbc/h2"), JTDS("lib/jdbc/jtds"), MYSQL("lib/jdbc/mysql"), ORACLE("extensions/jdbc-driver/oracle"), POSTGRESQL("lib/jdbc/postgresql"); final String path; - Provider(@Nullable String path) { + Provider(String path) { this.path = path; } } @@ -52,17 +50,11 @@ public class JdbcSettings { Provider provider = driverProvider(url); checkUrlParameters(provider, url); String driverPath = driverPath(homeDir, provider); - if (driverPath != null) { - props.set(ProcessConstants.JDBC_DRIVER_PATH, driverPath); - } + props.set(ProcessConstants.JDBC_DRIVER_PATH, driverPath); } - @CheckForNull String driverPath(File homeDir, Provider provider) { String dirPath = provider.path; - if (dirPath == null) { - return null; - } File dir = new File(homeDir, dirPath); if (!dir.exists()) { throw new MessageException("Directory does not exist: " + dirPath); |