DS-3335: Update to latest version of PostgreSQL JDBC driver. Properly select driver based on JDK installed

This commit is contained in:
Tim Donohue
2016-09-23 10:38:30 -05:00
parent 6fc128476d
commit 688c6ab714

42
pom.xml
View File

@@ -24,6 +24,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>${project.build.sourceEncoding}</project.reporting.outputEncoding> <project.reporting.outputEncoding>${project.build.sourceEncoding}</project.reporting.outputEncoding>
<java.version>1.7</java.version> <java.version>1.7</java.version>
<postgresql.driver.version>9.4.1211</postgresql.driver.version>
<solr.version>4.10.4</solr.version> <solr.version>4.10.4</solr.version>
<jena.version>2.13.0</jena.version> <jena.version>2.13.0</jena.version>
<slf4j.version>1.7.14</slf4j.version> <slf4j.version>1.7.14</slf4j.version>
@@ -512,6 +513,42 @@
</properties> </properties>
</profile> </profile>
<!-- PostgreSQL ships different JDBC drivers based on the version of Java
you are running. See https://jdbc.postgresql.org/download.html
These next two profiles handle pulling in the correct PostgreSQL JDBC driver. -->
<!-- Default PostgreSQL driver is only for Java 8 -->
<profile>
<id>postgresql-jdbc-default</id>
<activation>
<jdk>[1.8,)</jdk>
</activation>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>${postgresql.driver.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
</profile>
<!-- If running Java 7, use JRE7 PostgreSQL driver -->
<profile>
<id>postgresql-jdbc-jre7</id>
<activation>
<jdk>[1.7,1.8)</jdk>
</activation>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>${postgresql.driver.version}.jre7</version>
</dependency>
</dependencies>
</dependencyManagement>
</profile>
<!-- <!--
These profiles activate the inclusion of various modules into These profiles activate the inclusion of various modules into
the DSpace Build process. They activate automatically if the the DSpace Build process. They activate automatically if the
@@ -1235,11 +1272,6 @@
<artifactId>icu4j</artifactId> <artifactId>icu4j</artifactId>
<version>56.1</version> <version>56.1</version>
</dependency> </dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>9.4-1206-jdbc41</version>
</dependency>
<dependency> <dependency>
<groupId>com.oracle</groupId> <groupId>com.oracle</groupId>
<artifactId>ojdbc6</artifactId> <artifactId>ojdbc6</artifactId>