[postgis-java] 01/08: Imported Upstream version 2.2.1

Bas Couwenberg sebastic at debian.org
Fri Jul 29 09:19:48 UTC 2016


This is an automated email from the git hooks/post-receive script.

sebastic pushed a commit to branch master
in repository postgis-java.

commit c7ce22256b6f6c88fa986f529ad5df1e156b55ad
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Fri Jul 29 08:39:51 2016 +0200

    Imported Upstream version 2.2.1
---
 .idea/compiler.xml                                 |  19 +-
 .idea/encodings.xml                                |   2 +
 ...aven__ch_qos_logback_logback_classic_1_1_7.xml} |   8 +-
 ...> Maven__ch_qos_logback_logback_core_1_1_7.xml} |   8 +-
 .idea/libraries/Maven__junit_junit_4_10.xml        |  13 --
 .../libraries/Maven__org_apache_ant_ant_1_7_0.xml  |  13 --
 .../Maven__org_apache_ant_ant_launcher_1_7_0.xml   |  13 --
 .../Maven__org_hamcrest_hamcrest_core_1_1.xml      |  13 --
 ...en__org_postgresql_postgresql_9_4_1209_jre7.xml |  13 ++
 ...3.xml => Maven__org_slf4j_slf4j_api_1_7_21.xml} |   8 +-
 ...9_9.xml => Maven__org_testng_testng_6_9_10.xml} |   8 +-
 .idea/libraries/Maven__org_yaml_snakeyaml_1_15.xml |  13 --
 ...aven__postgresql_postgresql_9_1_901_1_jdbc4.xml |  13 --
 .idea/modules.xml                                  |   2 +
 jdbc/pom.xml                                       |  10 +-
 jdbc/postgis-jdbc.iml                              |  15 +-
 jdbc/src/main/java/org/postgis/DriverWrapper.java  |   4 +-
 jdbc_jtsparser/pom.xml                             |   6 +-
 jdbc_jtsparser/postgis-jdbc-jtsparser.iml          |  15 +-
 .../main/java/org/postgis/jts/JtsGisWrapper.java   |   4 +-
 .../src/main/java/org/postgis/jts/JtsWrapper.java  |   4 +-
 pom.xml                                            |  43 ++--
 postgis-java-aggregator.iml                        |  13 +-
 postgis-jdbc-java2d/pom.xml                        |   8 +-
 postgis-jdbc-java2d/postgis-jdbc-java2d.iml        |  15 +-
 .../java/org/postgis/java2d/Java2DWrapper.java     |   4 +-
 tools/osgeo-postgis-jdbc-test-util/.gitignore      |   1 +
 .../osgeo-postgis-jdbc-test-util.iml               |  16 +-
 tools/osgeo-postgis-jdbc-test-util/pom.xml         |  99 +++++++++
 .../src/main/java/net/postgis/osgeo/util/Main.java | 236 +++++++++++++++++++++
 .../src/main/scripts/test.sh                       |  24 +++
 .../test/java/net/postgis/osgeo/util/UtilTest.java |  40 ++++
 .../src/test/resources/logback-test.xml            |  15 ++
 .../src/test/resources/testng.xml                  |  14 ++
 tools/pom.xml                                      |  21 ++
 jdbc/postgis-jdbc.iml => tools/tools.iml           |  15 +-
 36 files changed, 563 insertions(+), 205 deletions(-)

diff --git a/.idea/compiler.xml b/.idea/compiler.xml
index a43f527..d72c827 100644
--- a/.idea/compiler.xml
+++ b/.idea/compiler.xml
@@ -17,34 +17,25 @@
       <profile default="true" name="Default" enabled="false">
         <processorPath useClasspath="true" />
       </profile>
-      <profile default="false" name="Annotation profile for postgis-jdbc" enabled="true">
+      <profile default="false" name="Maven default annotation processors profile" enabled="true">
         <sourceOutputDir name="target/generated-sources/annotations" />
         <sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
         <outputRelativeToContentRoot value="true" />
         <processorPath useClasspath="true" />
+        <module name="osgeo-postgis-jdbc-test-util" />
         <module name="postgis-jdbc" />
-      </profile>
-      <profile default="false" name="Annotation profile for postgis-jdbc-jtsparser" enabled="true">
-        <sourceOutputDir name="target/generated-sources/annotations" />
-        <sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
-        <outputRelativeToContentRoot value="true" />
-        <processorPath useClasspath="true" />
-        <module name="postgis-jdbc-jtsparser" />
-      </profile>
-      <profile default="false" name="Annotation profile for postgis-jdbc-java2d" enabled="true">
-        <sourceOutputDir name="target/generated-sources/annotations" />
-        <sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
-        <outputRelativeToContentRoot value="true" />
-        <processorPath useClasspath="true" />
         <module name="postgis-jdbc-java2d" />
+        <module name="postgis-jdbc-jtsparser" />
       </profile>
     </annotationProcessing>
     <bytecodeTargetLevel>
+      <module name="osgeo-postgis-jdbc-test-util" target="1.7" />
       <module name="postgis-aggregator" target="1.8" />
       <module name="postgis-java-aggregator" target="1.7" />
       <module name="postgis-jdbc" target="1.7" />
       <module name="postgis-jdbc-java2d" target="1.7" />
       <module name="postgis-jdbc-jtsparser" target="1.7" />
+      <module name="tools" target="1.7" />
     </bytecodeTargetLevel>
   </component>
 </project>
\ No newline at end of file
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
index 5be5ab9..431d027 100644
--- a/.idea/encodings.xml
+++ b/.idea/encodings.xml
@@ -5,6 +5,8 @@
     <file url="file://$PROJECT_DIR$/jdbc" charset="UTF-8" />
     <file url="file://$PROJECT_DIR$/jdbc_jtsparser" charset="UTF-8" />
     <file url="file://$PROJECT_DIR$/postgis-jdbc-java2d" charset="UTF-8" />
+    <file url="file://$PROJECT_DIR$/tools" charset="UTF-8" />
+    <file url="file://$PROJECT_DIR$/tools/osgeo-postgis-jdbc-test-util" charset="UTF-8" />
     <file url="PROJECT" charset="UTF-8" />
   </component>
 </project>
\ No newline at end of file
diff --git a/.idea/libraries/Maven__ch_qos_logback_logback_classic_1_1_3.xml b/.idea/libraries/Maven__ch_qos_logback_logback_classic_1_1_7.xml
similarity index 58%
rename from .idea/libraries/Maven__ch_qos_logback_logback_classic_1_1_3.xml
rename to .idea/libraries/Maven__ch_qos_logback_logback_classic_1_1_7.xml
index 6c9fc33..cdd7959 100644
--- a/.idea/libraries/Maven__ch_qos_logback_logback_classic_1_1_3.xml
+++ b/.idea/libraries/Maven__ch_qos_logback_logback_classic_1_1_7.xml
@@ -1,13 +1,13 @@
 <component name="libraryTable">
-  <library name="Maven: ch.qos.logback:logback-classic:1.1.3">
+  <library name="Maven: ch.qos.logback:logback-classic:1.1.7">
     <CLASSES>
-      <root url="jar://$MAVEN_REPOSITORY$/ch/qos/logback/logback-classic/1.1.3/logback-classic-1.1.3.jar!/" />
+      <root url="jar://$MAVEN_REPOSITORY$/ch/qos/logback/logback-classic/1.1.7/logback-classic-1.1.7.jar!/" />
     </CLASSES>
     <JAVADOC>
-      <root url="jar://$MAVEN_REPOSITORY$/ch/qos/logback/logback-classic/1.1.3/logback-classic-1.1.3-javadoc.jar!/" />
+      <root url="jar://$MAVEN_REPOSITORY$/ch/qos/logback/logback-classic/1.1.7/logback-classic-1.1.7-javadoc.jar!/" />
     </JAVADOC>
     <SOURCES>
-      <root url="jar://$MAVEN_REPOSITORY$/ch/qos/logback/logback-classic/1.1.3/logback-classic-1.1.3-sources.jar!/" />
+      <root url="jar://$MAVEN_REPOSITORY$/ch/qos/logback/logback-classic/1.1.7/logback-classic-1.1.7-sources.jar!/" />
     </SOURCES>
   </library>
 </component>
\ No newline at end of file
diff --git a/.idea/libraries/Maven__ch_qos_logback_logback_core_1_1_3.xml b/.idea/libraries/Maven__ch_qos_logback_logback_core_1_1_7.xml
similarity index 60%
rename from .idea/libraries/Maven__ch_qos_logback_logback_core_1_1_3.xml
rename to .idea/libraries/Maven__ch_qos_logback_logback_core_1_1_7.xml
index fd35ca4..6c2a760 100644
--- a/.idea/libraries/Maven__ch_qos_logback_logback_core_1_1_3.xml
+++ b/.idea/libraries/Maven__ch_qos_logback_logback_core_1_1_7.xml
@@ -1,13 +1,13 @@
 <component name="libraryTable">
-  <library name="Maven: ch.qos.logback:logback-core:1.1.3">
+  <library name="Maven: ch.qos.logback:logback-core:1.1.7">
     <CLASSES>
-      <root url="jar://$MAVEN_REPOSITORY$/ch/qos/logback/logback-core/1.1.3/logback-core-1.1.3.jar!/" />
+      <root url="jar://$MAVEN_REPOSITORY$/ch/qos/logback/logback-core/1.1.7/logback-core-1.1.7.jar!/" />
     </CLASSES>
     <JAVADOC>
-      <root url="jar://$MAVEN_REPOSITORY$/ch/qos/logback/logback-core/1.1.3/logback-core-1.1.3-javadoc.jar!/" />
+      <root url="jar://$MAVEN_REPOSITORY$/ch/qos/logback/logback-core/1.1.7/logback-core-1.1.7-javadoc.jar!/" />
     </JAVADOC>
     <SOURCES>
-      <root url="jar://$MAVEN_REPOSITORY$/ch/qos/logback/logback-core/1.1.3/logback-core-1.1.3-sources.jar!/" />
+      <root url="jar://$MAVEN_REPOSITORY$/ch/qos/logback/logback-core/1.1.7/logback-core-1.1.7-sources.jar!/" />
     </SOURCES>
   </library>
 </component>
\ No newline at end of file
diff --git a/.idea/libraries/Maven__junit_junit_4_10.xml b/.idea/libraries/Maven__junit_junit_4_10.xml
deleted file mode 100644
index ed8bf5f..0000000
--- a/.idea/libraries/Maven__junit_junit_4_10.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<component name="libraryTable">
-  <library name="Maven: junit:junit:4.10">
-    <CLASSES>
-      <root url="jar://$MAVEN_REPOSITORY$/junit/junit/4.10/junit-4.10.jar!/" />
-    </CLASSES>
-    <JAVADOC>
-      <root url="jar://$MAVEN_REPOSITORY$/junit/junit/4.10/junit-4.10-javadoc.jar!/" />
-    </JAVADOC>
-    <SOURCES>
-      <root url="jar://$MAVEN_REPOSITORY$/junit/junit/4.10/junit-4.10-sources.jar!/" />
-    </SOURCES>
-  </library>
-</component>
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_apache_ant_ant_1_7_0.xml b/.idea/libraries/Maven__org_apache_ant_ant_1_7_0.xml
deleted file mode 100644
index 8124522..0000000
--- a/.idea/libraries/Maven__org_apache_ant_ant_1_7_0.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<component name="libraryTable">
-  <library name="Maven: org.apache.ant:ant:1.7.0">
-    <CLASSES>
-      <root url="jar://$MAVEN_REPOSITORY$/org/apache/ant/ant/1.7.0/ant-1.7.0.jar!/" />
-    </CLASSES>
-    <JAVADOC>
-      <root url="jar://$MAVEN_REPOSITORY$/org/apache/ant/ant/1.7.0/ant-1.7.0-javadoc.jar!/" />
-    </JAVADOC>
-    <SOURCES>
-      <root url="jar://$MAVEN_REPOSITORY$/org/apache/ant/ant/1.7.0/ant-1.7.0-sources.jar!/" />
-    </SOURCES>
-  </library>
-</component>
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_apache_ant_ant_launcher_1_7_0.xml b/.idea/libraries/Maven__org_apache_ant_ant_launcher_1_7_0.xml
deleted file mode 100644
index 78f510c..0000000
--- a/.idea/libraries/Maven__org_apache_ant_ant_launcher_1_7_0.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<component name="libraryTable">
-  <library name="Maven: org.apache.ant:ant-launcher:1.7.0">
-    <CLASSES>
-      <root url="jar://$MAVEN_REPOSITORY$/org/apache/ant/ant-launcher/1.7.0/ant-launcher-1.7.0.jar!/" />
-    </CLASSES>
-    <JAVADOC>
-      <root url="jar://$MAVEN_REPOSITORY$/org/apache/ant/ant-launcher/1.7.0/ant-launcher-1.7.0-javadoc.jar!/" />
-    </JAVADOC>
-    <SOURCES>
-      <root url="jar://$MAVEN_REPOSITORY$/org/apache/ant/ant-launcher/1.7.0/ant-launcher-1.7.0-sources.jar!/" />
-    </SOURCES>
-  </library>
-</component>
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_1.xml b/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_1.xml
deleted file mode 100644
index acdf443..0000000
--- a/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_1.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<component name="libraryTable">
-  <library name="Maven: org.hamcrest:hamcrest-core:1.1">
-    <CLASSES>
-      <root url="jar://$MAVEN_REPOSITORY$/org/hamcrest/hamcrest-core/1.1/hamcrest-core-1.1.jar!/" />
-    </CLASSES>
-    <JAVADOC>
-      <root url="jar://$MAVEN_REPOSITORY$/org/hamcrest/hamcrest-core/1.1/hamcrest-core-1.1-javadoc.jar!/" />
-    </JAVADOC>
-    <SOURCES>
-      <root url="jar://$MAVEN_REPOSITORY$/org/hamcrest/hamcrest-core/1.1/hamcrest-core-1.1-sources.jar!/" />
-    </SOURCES>
-  </library>
-</component>
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_postgresql_postgresql_9_4_1209_jre7.xml b/.idea/libraries/Maven__org_postgresql_postgresql_9_4_1209_jre7.xml
new file mode 100644
index 0000000..4e5aef1
--- /dev/null
+++ b/.idea/libraries/Maven__org_postgresql_postgresql_9_4_1209_jre7.xml
@@ -0,0 +1,13 @@
+<component name="libraryTable">
+  <library name="Maven: org.postgresql:postgresql:9.4.1209.jre7">
+    <CLASSES>
+      <root url="jar://$MAVEN_REPOSITORY$/org/postgresql/postgresql/9.4.1209.jre7/postgresql-9.4.1209.jre7.jar!/" />
+    </CLASSES>
+    <JAVADOC>
+      <root url="jar://$MAVEN_REPOSITORY$/org/postgresql/postgresql/9.4.1209.jre7/postgresql-9.4.1209.jre7-javadoc.jar!/" />
+    </JAVADOC>
+    <SOURCES>
+      <root url="jar://$MAVEN_REPOSITORY$/org/postgresql/postgresql/9.4.1209.jre7/postgresql-9.4.1209.jre7-sources.jar!/" />
+    </SOURCES>
+  </library>
+</component>
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_slf4j_slf4j_api_1_7_13.xml b/.idea/libraries/Maven__org_slf4j_slf4j_api_1_7_21.xml
similarity index 64%
rename from .idea/libraries/Maven__org_slf4j_slf4j_api_1_7_13.xml
rename to .idea/libraries/Maven__org_slf4j_slf4j_api_1_7_21.xml
index 4fd913d..1b644dd 100644
--- a/.idea/libraries/Maven__org_slf4j_slf4j_api_1_7_13.xml
+++ b/.idea/libraries/Maven__org_slf4j_slf4j_api_1_7_21.xml
@@ -1,13 +1,13 @@
 <component name="libraryTable">
-  <library name="Maven: org.slf4j:slf4j-api:1.7.13">
+  <library name="Maven: org.slf4j:slf4j-api:1.7.21">
     <CLASSES>
-      <root url="jar://$MAVEN_REPOSITORY$/org/slf4j/slf4j-api/1.7.13/slf4j-api-1.7.13.jar!/" />
+      <root url="jar://$MAVEN_REPOSITORY$/org/slf4j/slf4j-api/1.7.21/slf4j-api-1.7.21.jar!/" />
     </CLASSES>
     <JAVADOC>
-      <root url="jar://$MAVEN_REPOSITORY$/org/slf4j/slf4j-api/1.7.13/slf4j-api-1.7.13-javadoc.jar!/" />
+      <root url="jar://$MAVEN_REPOSITORY$/org/slf4j/slf4j-api/1.7.21/slf4j-api-1.7.21-javadoc.jar!/" />
     </JAVADOC>
     <SOURCES>
-      <root url="jar://$MAVEN_REPOSITORY$/org/slf4j/slf4j-api/1.7.13/slf4j-api-1.7.13-sources.jar!/" />
+      <root url="jar://$MAVEN_REPOSITORY$/org/slf4j/slf4j-api/1.7.21/slf4j-api-1.7.21-sources.jar!/" />
     </SOURCES>
   </library>
 </component>
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_testng_testng_6_9_9.xml b/.idea/libraries/Maven__org_testng_testng_6_9_10.xml
similarity index 66%
rename from .idea/libraries/Maven__org_testng_testng_6_9_9.xml
rename to .idea/libraries/Maven__org_testng_testng_6_9_10.xml
index 0d0a507..9568e30 100644
--- a/.idea/libraries/Maven__org_testng_testng_6_9_9.xml
+++ b/.idea/libraries/Maven__org_testng_testng_6_9_10.xml
@@ -1,13 +1,13 @@
 <component name="libraryTable">
-  <library name="Maven: org.testng:testng:6.9.9">
+  <library name="Maven: org.testng:testng:6.9.10">
     <CLASSES>
-      <root url="jar://$MAVEN_REPOSITORY$/org/testng/testng/6.9.9/testng-6.9.9.jar!/" />
+      <root url="jar://$MAVEN_REPOSITORY$/org/testng/testng/6.9.10/testng-6.9.10.jar!/" />
     </CLASSES>
     <JAVADOC>
-      <root url="jar://$MAVEN_REPOSITORY$/org/testng/testng/6.9.9/testng-6.9.9-javadoc.jar!/" />
+      <root url="jar://$MAVEN_REPOSITORY$/org/testng/testng/6.9.10/testng-6.9.10-javadoc.jar!/" />
     </JAVADOC>
     <SOURCES>
-      <root url="jar://$MAVEN_REPOSITORY$/org/testng/testng/6.9.9/testng-6.9.9-sources.jar!/" />
+      <root url="jar://$MAVEN_REPOSITORY$/org/testng/testng/6.9.10/testng-6.9.10-sources.jar!/" />
     </SOURCES>
   </library>
 </component>
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_yaml_snakeyaml_1_15.xml b/.idea/libraries/Maven__org_yaml_snakeyaml_1_15.xml
deleted file mode 100644
index 02d9152..0000000
--- a/.idea/libraries/Maven__org_yaml_snakeyaml_1_15.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<component name="libraryTable">
-  <library name="Maven: org.yaml:snakeyaml:1.15">
-    <CLASSES>
-      <root url="jar://$MAVEN_REPOSITORY$/org/yaml/snakeyaml/1.15/snakeyaml-1.15.jar!/" />
-    </CLASSES>
-    <JAVADOC>
-      <root url="jar://$MAVEN_REPOSITORY$/org/yaml/snakeyaml/1.15/snakeyaml-1.15-javadoc.jar!/" />
-    </JAVADOC>
-    <SOURCES>
-      <root url="jar://$MAVEN_REPOSITORY$/org/yaml/snakeyaml/1.15/snakeyaml-1.15-sources.jar!/" />
-    </SOURCES>
-  </library>
-</component>
\ No newline at end of file
diff --git a/.idea/libraries/Maven__postgresql_postgresql_9_1_901_1_jdbc4.xml b/.idea/libraries/Maven__postgresql_postgresql_9_1_901_1_jdbc4.xml
deleted file mode 100644
index b79d684..0000000
--- a/.idea/libraries/Maven__postgresql_postgresql_9_1_901_1_jdbc4.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<component name="libraryTable">
-  <library name="Maven: postgresql:postgresql:9.1-901-1.jdbc4">
-    <CLASSES>
-      <root url="jar://$MAVEN_REPOSITORY$/postgresql/postgresql/9.1-901-1.jdbc4/postgresql-9.1-901-1.jdbc4.jar!/" />
-    </CLASSES>
-    <JAVADOC>
-      <root url="jar://$MAVEN_REPOSITORY$/postgresql/postgresql/9.1-901-1.jdbc4/postgresql-9.1-901-1.jdbc4-javadoc.jar!/" />
-    </JAVADOC>
-    <SOURCES>
-      <root url="jar://$MAVEN_REPOSITORY$/postgresql/postgresql/9.1-901-1.jdbc4/postgresql-9.1-901-1.jdbc4-sources.jar!/" />
-    </SOURCES>
-  </library>
-</component>
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
index d94906a..fcb6b2e 100644
--- a/.idea/modules.xml
+++ b/.idea/modules.xml
@@ -2,10 +2,12 @@
 <project version="4">
   <component name="ProjectModuleManager">
     <modules>
+      <module fileurl="file://$PROJECT_DIR$/tools/osgeo-postgis-jdbc-test-util/osgeo-postgis-jdbc-test-util.iml" filepath="$PROJECT_DIR$/tools/osgeo-postgis-jdbc-test-util/osgeo-postgis-jdbc-test-util.iml" group="tools and modules" />
       <module fileurl="file://$PROJECT_DIR$/postgis-java-aggregator.iml" filepath="$PROJECT_DIR$/postgis-java-aggregator.iml" />
       <module fileurl="file://$PROJECT_DIR$/jdbc/postgis-jdbc.iml" filepath="$PROJECT_DIR$/jdbc/postgis-jdbc.iml" />
       <module fileurl="file://$PROJECT_DIR$/postgis-jdbc-java2d/postgis-jdbc-java2d.iml" filepath="$PROJECT_DIR$/postgis-jdbc-java2d/postgis-jdbc-java2d.iml" />
       <module fileurl="file://$PROJECT_DIR$/jdbc_jtsparser/postgis-jdbc-jtsparser.iml" filepath="$PROJECT_DIR$/jdbc_jtsparser/postgis-jdbc-jtsparser.iml" />
+      <module fileurl="file://$PROJECT_DIR$/tools/tools.iml" filepath="$PROJECT_DIR$/tools/tools.iml" group="tools and modules" />
     </modules>
   </component>
 </project>
\ No newline at end of file
diff --git a/jdbc/pom.xml b/jdbc/pom.xml
index f0d9445..e2a3d12 100644
--- a/jdbc/pom.xml
+++ b/jdbc/pom.xml
@@ -5,11 +5,11 @@
     <parent>
         <groupId>net.postgis</groupId>
         <artifactId>postgis-java-aggregator</artifactId>
-        <version>2.2.1-SNAPSHOT</version>
+        <version>2.2.2-SNAPSHOT</version>
     </parent>
 
     <artifactId>postgis-jdbc</artifactId>
-    <version>2.2.1-SNAPSHOT</version>
+    <version>2.2.2-SNAPSHOT</version>
     <packaging>jar</packaging>
 
     <name>Postgis JDBC Driver</name>
@@ -25,9 +25,9 @@
 
     <dependencies>
         <dependency>
-            <groupId>postgresql</groupId>
+            <groupId>org.postgresql</groupId>
             <artifactId>postgresql</artifactId>
-            <version>[9.1-901.jdbc3,)</version>
+            <version>[9.4.1208.jre7,)</version>
         </dependency>
     </dependencies>
 
@@ -58,4 +58,4 @@
         </plugins>
     </build>
 
-</project>
\ No newline at end of file
+</project>
diff --git a/jdbc/postgis-jdbc.iml b/jdbc/postgis-jdbc.iml
index 6175bda..3c75d56 100644
--- a/jdbc/postgis-jdbc.iml
+++ b/jdbc/postgis-jdbc.iml
@@ -12,17 +12,12 @@
     </content>
     <orderEntry type="inheritedJdk" />
     <orderEntry type="sourceFolder" forTests="false" />
-    <orderEntry type="library" name="Maven: postgresql:postgresql:9.1-901-1.jdbc4" level="project" />
-    <orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.1.3" level="project" />
-    <orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.1.3" level="project" />
-    <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.13" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.testng:testng:6.9.9" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.10" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.1" level="project" />
+    <orderEntry type="library" name="Maven: org.postgresql:postgresql:9.4.1209.jre7" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: ch.qos.logback:logback-classic:1.1.7" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: ch.qos.logback:logback-core:1.1.7" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.slf4j:slf4j-api:1.7.21" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.testng:testng:6.9.10" level="project" />
     <orderEntry type="library" scope="TEST" name="Maven: com.beust:jcommander:1.48" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.apache.ant:ant:1.7.0" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.apache.ant:ant-launcher:1.7.0" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.yaml:snakeyaml:1.15" level="project" />
     <orderEntry type="library" scope="TEST" name="Maven: org.beanshell:bsh:2.0b4" level="project" />
   </component>
 </module>
\ No newline at end of file
diff --git a/jdbc/src/main/java/org/postgis/DriverWrapper.java b/jdbc/src/main/java/org/postgis/DriverWrapper.java
index 6f66f28..222d95b 100644
--- a/jdbc/src/main/java/org/postgis/DriverWrapper.java
+++ b/jdbc/src/main/java/org/postgis/DriverWrapper.java
@@ -179,10 +179,8 @@ public class DriverWrapper extends Driver {
      * @see java.sql.Driver#acceptsURL
      * @param url the URL of the driver
      * @return true if this driver accepts the given URL
-     * @exception SQLException Passed through from the underlying PostgreSQL
-     *                driver, should not happen.
      */
-    public boolean acceptsURL(String url) throws SQLException {
+    public boolean acceptsURL(String url) {
         try {
             url = mangleURL(url);
         } catch (SQLException e) {
diff --git a/jdbc_jtsparser/pom.xml b/jdbc_jtsparser/pom.xml
index 10e29be..3f48e81 100644
--- a/jdbc_jtsparser/pom.xml
+++ b/jdbc_jtsparser/pom.xml
@@ -5,11 +5,11 @@
 	<parent>
 		<groupId>net.postgis</groupId>
 		<artifactId>postgis-java-aggregator</artifactId>
-		<version>2.2.1-SNAPSHOT</version>
+		<version>2.2.2-SNAPSHOT</version>
 	</parent>
 
 	<artifactId>postgis-jdbc-jtsparser</artifactId>
-	<version>2.2.1-SNAPSHOT</version>
+	<version>2.2.2-SNAPSHOT</version>
 	<packaging>jar</packaging>
 
     <name>Postgis JDBC Driver JTS Parser</name>
@@ -57,4 +57,4 @@
         </plugins>
     </build>
 
-</project>
\ No newline at end of file
+</project>
diff --git a/jdbc_jtsparser/postgis-jdbc-jtsparser.iml b/jdbc_jtsparser/postgis-jdbc-jtsparser.iml
index 299b5d9..18755fd 100644
--- a/jdbc_jtsparser/postgis-jdbc-jtsparser.iml
+++ b/jdbc_jtsparser/postgis-jdbc-jtsparser.iml
@@ -12,19 +12,14 @@
     <orderEntry type="inheritedJdk" />
     <orderEntry type="sourceFolder" forTests="false" />
     <orderEntry type="module" module-name="postgis-jdbc" />
-    <orderEntry type="library" name="Maven: postgresql:postgresql:9.1-901-1.jdbc4" level="project" />
+    <orderEntry type="library" name="Maven: org.postgresql:postgresql:9.4.1209.jre7" level="project" />
     <orderEntry type="library" name="Maven: com.vividsolutions:jts:1.12" level="project" />
     <orderEntry type="library" name="Maven: xerces:xercesImpl:2.4.0" level="project" />
-    <orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.1.3" level="project" />
-    <orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.1.3" level="project" />
-    <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.13" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.testng:testng:6.9.9" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.10" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.1" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: ch.qos.logback:logback-classic:1.1.7" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: ch.qos.logback:logback-core:1.1.7" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.slf4j:slf4j-api:1.7.21" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.testng:testng:6.9.10" level="project" />
     <orderEntry type="library" scope="TEST" name="Maven: com.beust:jcommander:1.48" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.apache.ant:ant:1.7.0" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.apache.ant:ant-launcher:1.7.0" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.yaml:snakeyaml:1.15" level="project" />
     <orderEntry type="library" scope="TEST" name="Maven: org.beanshell:bsh:2.0b4" level="project" />
   </component>
 </module>
\ No newline at end of file
diff --git a/jdbc_jtsparser/src/main/java/org/postgis/jts/JtsGisWrapper.java b/jdbc_jtsparser/src/main/java/org/postgis/jts/JtsGisWrapper.java
index e993d04..a766203 100644
--- a/jdbc_jtsparser/src/main/java/org/postgis/jts/JtsGisWrapper.java
+++ b/jdbc_jtsparser/src/main/java/org/postgis/jts/JtsGisWrapper.java
@@ -120,10 +120,8 @@ public class JtsGisWrapper extends Driver {
      * @see java.sql.Driver#acceptsURL
      * @param url the URL of the driver
      * @return true if this driver accepts the given URL
-     * @exception SQLException if a database-access error occurs (Dont know why
-     *                it would *shrug*)
      */
-    public boolean acceptsURL(String url) throws SQLException {
+    public boolean acceptsURL(String url) {
         try {
             url = mangleURL(url);
         } catch (SQLException e) {
diff --git a/jdbc_jtsparser/src/main/java/org/postgis/jts/JtsWrapper.java b/jdbc_jtsparser/src/main/java/org/postgis/jts/JtsWrapper.java
index bae1824..9bc41f3 100644
--- a/jdbc_jtsparser/src/main/java/org/postgis/jts/JtsWrapper.java
+++ b/jdbc_jtsparser/src/main/java/org/postgis/jts/JtsWrapper.java
@@ -126,10 +126,8 @@ public class JtsWrapper extends Driver {
      * @see java.sql.Driver#acceptsURL
      * @param url the URL of the driver
      * @return true if this driver accepts the given URL
-     * @exception SQLException Passed through from the underlying PostgreSQL
-     *                driver, should not happen.
      */
-    public boolean acceptsURL(String url) throws SQLException {
+    public boolean acceptsURL(String url) {
         try {
             url = mangleURL(url);
         } catch (SQLException e) {
diff --git a/pom.xml b/pom.xml
index eb6de8f..960aa3b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
 
     <groupId>net.postgis</groupId>
     <artifactId>postgis-java-aggregator</artifactId>
-    <version>2.2.1-SNAPSHOT</version>
+    <version>2.2.2-SNAPSHOT</version>
     <packaging>pom</packaging>
 
     <name>PostGIS Java Project</name>
@@ -71,6 +71,7 @@
         <module>jdbc</module>
         <module>jdbc_jtsparser</module>
         <module>postgis-jdbc-java2d</module>
+        <module>tools</module>
     </modules>
 
     <scm>
@@ -96,6 +97,7 @@
 
     <properties>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
         <java.min.version>1.7</java.min.version>
         <maven.min.version>3.3</maven.min.version>
         <maven.test.skip>false</maven.test.skip>
@@ -106,29 +108,31 @@
         <failsafe.useSystemClassLoader>true</failsafe.useSystemClassLoader>
 
         <!-- Plugin versioning -->
-        <build-helper-maven-plugin.version>1.9.1</build-helper-maven-plugin.version>
-        <download-maven-plugin.version>1.2.1</download-maven-plugin.version>
+        <build-helper-maven-plugin.version>1.12</build-helper-maven-plugin.version>
+        <download-maven-plugin.version>1.3.0</download-maven-plugin.version>
         <maven-clean-plugin.version>3.0.0</maven-clean-plugin.version>
-        <maven-compiler-plugin.version>3.3</maven-compiler-plugin.version>
+        <maven-compiler-plugin.version>3.5.1</maven-compiler-plugin.version>
         <maven-dependency-plugin.version>2.10</maven-dependency-plugin.version>
         <maven-deploy-plugin.version>2.8.2</maven-deploy-plugin.version>
         <maven-ear-plugin.version>2.10.1</maven-ear-plugin.version>
         <maven-enforcer-plugin.version>1.4.1</maven-enforcer-plugin.version>
-        <maven-failsafe-plugin.version>2.19</maven-failsafe-plugin.version>
+        <maven-failsafe-plugin.version>2.19.1</maven-failsafe-plugin.version>
         <maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
         <maven-install-plugin.version>2.5.2</maven-install-plugin.version>
-        <maven-jar-plugin.version>2.6</maven-jar-plugin.version>
+        <maven-jar-plugin.version>3.0.2</maven-jar-plugin.version>
         <maven-jarsigner-plugin.version>1.4</maven-jarsigner-plugin.version>
-        <maven-javadoc-plugin.version>2.10.3</maven-javadoc-plugin.version>
+        <maven-javadoc-plugin.version>2.10.4</maven-javadoc-plugin.version>
+        <maven-jxr-plugin.version>2.5</maven-jxr-plugin.version>
         <maven-release-plugin.version>2.5.3</maven-release-plugin.version>
-        <maven-resources-plugin.version>2.7</maven-resources-plugin.version>
-        <maven-source-plugin.version>2.4</maven-source-plugin.version>
-        <maven-surefire-plugin.version>2.19</maven-surefire-plugin.version>
+        <maven-resources-plugin.version>3.0.1</maven-resources-plugin.version>
+        <maven-shade-plugin.version>2.4.3</maven-shade-plugin.version>
+        <maven-source-plugin.version>3.0.1</maven-source-plugin.version>
+        <maven-surefire-plugin.version>2.19.1</maven-surefire-plugin.version>
         <maven-war-plugin.version>2.6</maven-war-plugin.version>
         <!-- Dependency versions -->
-        <dependency.logback.version>1.1.3</dependency.logback.version>
-        <dependency.slfj.version>1.7.13</dependency.slfj.version>
-        <dependency.testng.version>6.9.9</dependency.testng.version>
+        <dependency.logback.version>1.1.7</dependency.logback.version>
+        <dependency.slfj.version>1.7.21</dependency.slfj.version>
+        <dependency.testng.version>6.9.10</dependency.testng.version>
     </properties>
 
     <dependencies>
@@ -136,16 +140,19 @@
             <groupId>ch.qos.logback</groupId>
             <artifactId>logback-classic</artifactId>
             <version>${dependency.logback.version}</version>
+            <scope>test</scope>
         </dependency>
         <dependency>
             <groupId>ch.qos.logback</groupId>
             <artifactId>logback-core</artifactId>
             <version>${dependency.logback.version}</version>
+            <scope>test</scope>
         </dependency>
         <dependency>
             <groupId>org.slf4j</groupId>
             <artifactId>slf4j-api</artifactId>
             <version>${dependency.slfj.version}</version>
+            <scope>test</scope>
         </dependency>
         <dependency>
             <groupId>org.testng</groupId>
@@ -253,6 +260,11 @@
             </plugin>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jxr-plugin</artifactId>
+                <version>${maven-jxr-plugin.version}</version>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-release-plugin</artifactId>
                 <version>${maven-release-plugin.version}</version>
                 <configuration>
@@ -269,6 +281,11 @@
             </plugin>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <version>${maven-shade-plugin.version}</version>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-source-plugin</artifactId>
                 <version>${maven-source-plugin.version}</version>
             </plugin>
diff --git a/postgis-java-aggregator.iml b/postgis-java-aggregator.iml
index 57a8f4f..25d9ae0 100644
--- a/postgis-java-aggregator.iml
+++ b/postgis-java-aggregator.iml
@@ -8,16 +8,11 @@
     </content>
     <orderEntry type="inheritedJdk" />
     <orderEntry type="sourceFolder" forTests="false" />
-    <orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.1.3" level="project" />
-    <orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.1.3" level="project" />
-    <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.13" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.testng:testng:6.9.9" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.10" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.1" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: ch.qos.logback:logback-classic:1.1.7" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: ch.qos.logback:logback-core:1.1.7" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.slf4j:slf4j-api:1.7.21" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.testng:testng:6.9.10" level="project" />
     <orderEntry type="library" scope="TEST" name="Maven: com.beust:jcommander:1.48" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.apache.ant:ant:1.7.0" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.apache.ant:ant-launcher:1.7.0" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.yaml:snakeyaml:1.15" level="project" />
     <orderEntry type="library" scope="TEST" name="Maven: org.beanshell:bsh:2.0b4" level="project" />
   </component>
 </module>
\ No newline at end of file
diff --git a/postgis-jdbc-java2d/pom.xml b/postgis-jdbc-java2d/pom.xml
index 8902952..ab87bc5 100644
--- a/postgis-jdbc-java2d/pom.xml
+++ b/postgis-jdbc-java2d/pom.xml
@@ -5,11 +5,11 @@
     <parent>
         <groupId>net.postgis</groupId>
         <artifactId>postgis-java-aggregator</artifactId>
-        <version>2.2.1-SNAPSHOT</version>
+        <version>2.2.2-SNAPSHOT</version>
     </parent>
 
     <artifactId>postgis-jdbc-java2d</artifactId>
-    <version>2.2.1-SNAPSHOT</version>
+    <version>2.2.2-SNAPSHOT</version>
     <packaging>jar</packaging>
 
     <name>postgis-jdbc-java2d</name>
@@ -27,7 +27,7 @@
         <dependency>
             <groupId>net.postgis</groupId>
             <artifactId>postgis-jdbc</artifactId>
-            <version>2.2.1-SNAPSHOT</version>
+            <version>2.2.2-SNAPSHOT</version>
         </dependency>
     </dependencies>
 
@@ -52,4 +52,4 @@
         </plugins>
     </build>
 
-</project>
\ No newline at end of file
+</project>
diff --git a/postgis-jdbc-java2d/postgis-jdbc-java2d.iml b/postgis-jdbc-java2d/postgis-jdbc-java2d.iml
index 620cc3b..53c5a4c 100644
--- a/postgis-jdbc-java2d/postgis-jdbc-java2d.iml
+++ b/postgis-jdbc-java2d/postgis-jdbc-java2d.iml
@@ -12,17 +12,12 @@
     <orderEntry type="inheritedJdk" />
     <orderEntry type="sourceFolder" forTests="false" />
     <orderEntry type="module" module-name="postgis-jdbc" />
-    <orderEntry type="library" name="Maven: postgresql:postgresql:9.1-901-1.jdbc4" level="project" />
-    <orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.1.3" level="project" />
-    <orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.1.3" level="project" />
-    <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.13" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.testng:testng:6.9.9" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.10" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.1" level="project" />
+    <orderEntry type="library" name="Maven: org.postgresql:postgresql:9.4.1209.jre7" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: ch.qos.logback:logback-classic:1.1.7" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: ch.qos.logback:logback-core:1.1.7" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.slf4j:slf4j-api:1.7.21" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.testng:testng:6.9.10" level="project" />
     <orderEntry type="library" scope="TEST" name="Maven: com.beust:jcommander:1.48" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.apache.ant:ant:1.7.0" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.apache.ant:ant-launcher:1.7.0" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.yaml:snakeyaml:1.15" level="project" />
     <orderEntry type="library" scope="TEST" name="Maven: org.beanshell:bsh:2.0b4" level="project" />
   </component>
 </module>
\ No newline at end of file
diff --git a/postgis-jdbc-java2d/src/main/java/org/postgis/java2d/Java2DWrapper.java b/postgis-jdbc-java2d/src/main/java/org/postgis/java2d/Java2DWrapper.java
index 0a0d461..30f2954 100644
--- a/postgis-jdbc-java2d/src/main/java/org/postgis/java2d/Java2DWrapper.java
+++ b/postgis-jdbc-java2d/src/main/java/org/postgis/java2d/Java2DWrapper.java
@@ -127,10 +127,8 @@ public class Java2DWrapper extends Driver {
      * @see java.sql.Driver#acceptsURL
      * @param url the URL of the driver
      * @return true if this driver accepts the given URL
-     * @exception SQLException if a database-access error occurs (Dont know why
-     *                it would *shrug*)
      */
-    public boolean acceptsURL(String url) throws SQLException {
+    public boolean acceptsURL(String url) {
         try {
             url = mangleURL(url);
         } catch (SQLException e) {
diff --git a/tools/osgeo-postgis-jdbc-test-util/.gitignore b/tools/osgeo-postgis-jdbc-test-util/.gitignore
new file mode 100644
index 0000000..916e17c
--- /dev/null
+++ b/tools/osgeo-postgis-jdbc-test-util/.gitignore
@@ -0,0 +1 @@
+dependency-reduced-pom.xml
diff --git a/jdbc/postgis-jdbc.iml b/tools/osgeo-postgis-jdbc-test-util/osgeo-postgis-jdbc-test-util.iml
similarity index 64%
copy from jdbc/postgis-jdbc.iml
copy to tools/osgeo-postgis-jdbc-test-util/osgeo-postgis-jdbc-test-util.iml
index 6175bda..9511727 100644
--- a/jdbc/postgis-jdbc.iml
+++ b/tools/osgeo-postgis-jdbc-test-util/osgeo-postgis-jdbc-test-util.iml
@@ -12,17 +12,13 @@
     </content>
     <orderEntry type="inheritedJdk" />
     <orderEntry type="sourceFolder" forTests="false" />
-    <orderEntry type="library" name="Maven: postgresql:postgresql:9.1-901-1.jdbc4" level="project" />
-    <orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.1.3" level="project" />
-    <orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.1.3" level="project" />
-    <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.13" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.testng:testng:6.9.9" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.10" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.1" level="project" />
+    <orderEntry type="module" module-name="postgis-jdbc" />
+    <orderEntry type="library" name="Maven: org.postgresql:postgresql:9.4.1209.jre7" level="project" />
+    <orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.1.7" level="project" />
+    <orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.1.7" level="project" />
+    <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.21" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.testng:testng:6.9.10" level="project" />
     <orderEntry type="library" scope="TEST" name="Maven: com.beust:jcommander:1.48" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.apache.ant:ant:1.7.0" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.apache.ant:ant-launcher:1.7.0" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.yaml:snakeyaml:1.15" level="project" />
     <orderEntry type="library" scope="TEST" name="Maven: org.beanshell:bsh:2.0b4" level="project" />
   </component>
 </module>
\ No newline at end of file
diff --git a/tools/osgeo-postgis-jdbc-test-util/pom.xml b/tools/osgeo-postgis-jdbc-test-util/pom.xml
new file mode 100644
index 0000000..b05704b
--- /dev/null
+++ b/tools/osgeo-postgis-jdbc-test-util/pom.xml
@@ -0,0 +1,99 @@
+<?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>
+        <artifactId>tools</artifactId>
+        <groupId>net.postgis</groupId>
+        <version>2.2.2-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>osgeo-postgis-jdbc-test-util</artifactId>
+    <version>2.2.2-SNAPSHOT</version>
+    <packaging>jar</packaging>
+
+    <name>osgeo-postgis-jdbc-test-util</name>
+    <description>
+        Simple smoke test util for verifying functionality postgis jdbc jar against a postgresql database with posgis
+        extensions on OSGeo-Live.
+    </description>
+
+    <properties>
+        <maven.test.skip>true</maven.test.skip>
+        <testTablePrefix>SMOKE_TEST</testTablePrefix>
+        <jdbcUrl>jdbc:postgresql://localhost:5432/postgis1</jdbcUrl>
+        <jdbcUsername>postgis1</jdbcUsername>
+        <jdbcPassword>postgis1</jdbcPassword>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>net.postgis</groupId>
+            <artifactId>postgis-jdbc</artifactId>
+            <version>2.2.2-SNAPSHOT</version>
+        </dependency>
+
+        <dependency>
+            <groupId>ch.qos.logback</groupId>
+            <artifactId>logback-classic</artifactId>
+            <version>${dependency.logback.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>ch.qos.logback</groupId>
+            <artifactId>logback-core</artifactId>
+            <version>${dependency.logback.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+            <version>${dependency.slfj.version}</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>shade</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <artifactSet>
+                                <excludes>
+                                    <exclude>net.postgis:postgis-jdbc</exclude>
+                                </excludes>
+                            </artifactSet>
+                            <transformers>
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+                                    <mainClass>net.postgis.osgeo.util.Main</mainClass>
+                                </transformer>
+                            </transformers>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <configuration>
+                    <skip>${maven.test.skip}</skip>
+                    <suiteXmlFiles>
+                        <suiteXmlFile>src/test/resources/testng.xml</suiteXmlFile>
+                    </suiteXmlFiles>
+                    <systemPropertyVariables>
+                        <testTablePrefix>${testTablePrefix}</testTablePrefix>
+                        <jdbcUrl>${jdbcUrl}</jdbcUrl>
+                        <jdbcUsername>${jdbcUsername}</jdbcUsername>
+                        <jdbcPassword>${jdbcPassword}</jdbcPassword>
+                    </systemPropertyVariables>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
\ No newline at end of file
diff --git a/tools/osgeo-postgis-jdbc-test-util/src/main/java/net/postgis/osgeo/util/Main.java b/tools/osgeo-postgis-jdbc-test-util/src/main/java/net/postgis/osgeo/util/Main.java
new file mode 100644
index 0000000..e874490
--- /dev/null
+++ b/tools/osgeo-postgis-jdbc-test-util/src/main/java/net/postgis/osgeo/util/Main.java
@@ -0,0 +1,236 @@
+package net.postgis.osgeo.util;
+
+import org.postgis.PGbox3d;
+import org.postgis.PGgeometry;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.sql.Connection;
+import java.sql.DatabaseMetaData;
+import java.sql.DriverManager;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Statement;
+import java.util.Objects;
+import java.util.UUID;
+
+
+/**
+ * Simple smoke test util for verifying functionality postgis jdbc jar against a postgresql database
+ * with posgis extensions on OSGeo-Live.
+ *
+ * @author Phillip Ross
+ */
+public class Main {
+
+    private static final Logger logger = LoggerFactory.getLogger(Main.class);
+
+    private static final String DEFAULT_TEST_TABLE_PREFIX = "SMOKE_TEST";
+
+    private static final String JDBC_DRIVER_CLASS_NAME = "org.postgresql.Driver";
+
+    private Connection connection = null;
+
+    private Statement statement = null;
+
+    private String testTableName = null;
+
+
+    public Main(final String jdbcUrl,
+                final String jdbcUsername,
+                final String jdbcPassword,
+                final String testTablePrefix) {
+        try {
+            Objects.requireNonNull(jdbcUrl, "A JDBC URL must be specified");
+            Objects.requireNonNull(jdbcUsername, "A database username must be specified.");
+            Objects.requireNonNull(jdbcPassword, "A database password must be specified.");
+            Objects.requireNonNull(testTablePrefix, "Unable to determine test table prefix");
+            logger.debug("Running test (url/u/p/ttp): {}/{}/{}/{}", jdbcUrl, jdbcUsername, jdbcPassword, testTablePrefix);
+            setupDatabaseResources(jdbcUrl, jdbcUsername, jdbcPassword);
+            Objects.requireNonNull(connection, "Unable to continue testing without a connection to the database");
+            if (testDatatypeRegistration()) {
+                Objects.requireNonNull(statement, "Unable to continue testing without a statement resource");
+                if (createTestTable(testTablePrefix)) {
+                    if (testSQL()) {
+                        logger.debug("All tests passed");
+                        dropTestTable();
+                    }
+                }
+            }
+            closeDatabaseResources();
+        } catch (Exception e) {
+            logger.error("Caught exception: {} {}", e.getClass().getName(), e.getMessage());
+            e.printStackTrace();
+        }
+    }
+
+
+    private boolean testSQL() {
+        final String insertPointSQL = "insert into " + testTableName + " values ('POINT (10 10 10)',1)";
+        final String insertPolygonSQL = "insert into " + testTableName + " values ('POLYGON ((0 0 0,0 10 0,10 10 0,10 0 0,0 0 0))',2)";
+
+        boolean testPass = false;
+        try {
+            logger.debug("Inserting point...");
+            statement.execute(insertPointSQL);
+
+            logger.debug("Inserting polygon...");
+            statement.execute(insertPolygonSQL);
+
+            logger.debug("Querying table...");
+            ResultSet resultSet = statement.executeQuery("select ST_AsText(geom),id from " + testTableName);
+            while (resultSet.next()) {
+                Object obj = resultSet.getObject(1);
+                int id = resultSet.getInt(2);
+                logger.debug("Row {}: {}", id, obj.toString());
+            }
+            testPass = true;
+        } catch (SQLException se) {
+            logger.error(
+                    "Caught SQLException attempting to issue SQL to the database: {} {}",
+                    se.getClass().getName(),
+                    se.getMessage()
+            );
+        }
+        return testPass;
+    }
+
+
+    private boolean createTestTable(final String testTablePrefix) {
+        testTableName = testTablePrefix + "_" + UUID.randomUUID().toString().replaceAll("-", "");
+        final String dropSQL = "drop table " + testTableName;
+        final String createSQL = "create table " + testTableName + " (geom geometry, id int4)";
+
+        boolean testPass = false;
+        logger.debug("Creating table with geometric types...");
+        boolean tableExists = false;
+        try {
+            DatabaseMetaData databaseMetaData = connection.getMetaData();
+            try (ResultSet resultSet = databaseMetaData.getTables(null, null, testTableName.toLowerCase(), new String[] {"TABLE"})) {
+                while (resultSet.next()) {
+                    tableExists = true;
+                }
+            }
+            if (tableExists) {
+                statement.execute(dropSQL);
+            }
+            statement.execute(createSQL);
+            testPass = true;
+        } catch (SQLException se) {
+            logger.error(
+                    "Caught SQLException attempting to create the test table: {} {}",
+                    se.getClass().getName(),
+                    se.getMessage()
+            );
+        }
+        return testPass;
+    }
+
+
+    private void dropTestTable() {
+        final String dropSQL = "drop table " + testTableName;
+        logger.debug("Dropping test table");
+        boolean tableExists = false;
+        try {
+            DatabaseMetaData databaseMetaData = connection.getMetaData();
+            try (ResultSet resultSet = databaseMetaData.getTables(null, null, testTableName.toLowerCase(), new String[] {"TABLE"})) {
+                while (resultSet.next()) {
+                    tableExists = true;
+                }
+            }
+            if (tableExists) {
+                statement.execute(dropSQL);
+            }
+        } catch (SQLException se) {
+            logger.error(
+                    "Caught SQLException attempting to drop the test table: {} {}",
+                    se.getClass().getName(),
+                    se.getMessage()
+            );
+        }
+    }
+
+
+    private boolean testDatatypeRegistration() {
+        boolean testPass = false;
+        logger.debug("Adding geometric type entries...");
+        try {
+            ((org.postgresql.PGConnection)connection).addDataType("geometry", PGgeometry.class);
+            ((org.postgresql.PGConnection)connection).addDataType("box3d", PGbox3d.class);
+            testPass = true;
+        } catch (SQLException se) {
+            logger.error(
+                    "Caught SQLException attempting to register datatypes with PostgreSQL driver: {} {}",
+                    se.getClass().getName(),
+                    se.getMessage()
+            );
+        }
+        return testPass;
+    }
+
+
+    private void closeDatabaseResources() {
+        try {
+            if (statement != null) {
+                statement.close();
+            }
+        } catch (SQLException se) {
+            logger.error(
+                    "Caught SQLException attempting to close statement resource: {} {}",
+                    se.getClass().getName(),
+                    se.getMessage()
+            );
+        }
+        try {
+            if (connection != null) {
+                connection.close();
+            }
+        } catch (SQLException se) {
+            logger.error(
+                    "Caught SQLException attempting to close connection to the database: {} {}",
+                    se.getClass().getName(),
+                    se.getMessage()
+            );
+        }
+    }
+
+
+    private void setupDatabaseResources(final String url, final String username, final String password) {
+        try {
+            Class.forName(JDBC_DRIVER_CLASS_NAME);
+        } catch (ClassNotFoundException e) {
+            logger.error("Caught exception attempting to load jdbc driver class {}", JDBC_DRIVER_CLASS_NAME);
+            logger.error("Check your classpath to verify that you've included the postgresql jdbc driver.");
+        }
+        try {
+            connection = DriverManager.getConnection(url, username, password);
+            statement = connection.createStatement();
+        } catch (SQLException se) {
+            logger.error(
+                    "Caught SQLException attempting to setup database resources: {} {}",
+                    se.getClass().getName(),
+                    se.getMessage()
+            );
+        }
+    }
+
+
+    public static void main(final String[] args) {
+        if (args.length < 3) {
+            System.out.println("parameters: jdbcUrl jdbcUsername jdbcPassword [testTablePrefix]");
+        } else {
+            String jdbcUrl = args[0];
+            String jdbcUsername = args[1];
+            String jdbcPassword = args[2];
+            String testTablePrefix = DEFAULT_TEST_TABLE_PREFIX;
+            if (args.length > 3) {
+                testTablePrefix = args[3];
+            }
+            new Main(jdbcUrl, jdbcUsername, jdbcPassword, testTablePrefix);
+        }
+    }
+
+
+}
+
+// java -classpath ~/.m2/repository/net/postgis/postgis-jdbc/2.2.1-SNAPSHOT/postgis-jdbc-2.2.1-SNAPSHOT.jar:target/osgeo-postgis-jdbc-test-util-0.0.1-SNAPSHOT.jar net.postgis.osgeo.util.Main jdbc:postgresql://db01:5432/postgis1 postgis1 postgis1 smoke_test
diff --git a/tools/osgeo-postgis-jdbc-test-util/src/main/scripts/test.sh b/tools/osgeo-postgis-jdbc-test-util/src/main/scripts/test.sh
new file mode 100644
index 0000000..4f96b26
--- /dev/null
+++ b/tools/osgeo-postgis-jdbc-test-util/src/main/scripts/test.sh
@@ -0,0 +1,24 @@
+#!/usr/bin/env bash
+
+# The following sets variables based in command arguments
+TEST_JAR="${1}"                # This should be the postgis-jdbc jar file to be tested.
+DB_HOSTNAME_AND_PORT=${2}      # This should be the hostname:port of the database
+DB_USERNAME=${3}               # This should be the database user to login as.
+DB_PASSWORD=${4}               # This should be the database password to be used during login.
+
+# The following can be changed to point to the jar containing the test utility.  By default it
+# points to a jar file in a local maven repository.
+MVN_REPO_LOCATION=~/.m2/repository
+GROUP_ID_DIR=/net/postgis
+TEST_UTIL_JAR=${MVN_REPO_LOCATION}${GROUP_ID_DIR}/osgeo-postgis-jdbc-test-util/0.0.1-SNAPSHOT/osgeo-postgis-jdbc-test-util-0.0.1-SNAPSHOT.jar
+
+# The following variables are derived from the variables above.
+# They are used to invoke the JVM with the test utility.
+JDBC_URL="jdbc:postgresql://${DB_HOSTNAME_AND_PORT}/postgis1"
+JDBC_USERNAME=${DB_USERNAME}
+JDBC_PASSWORD=${DB_PASSWORD}
+
+# The exactly commandline used to invoke the utility is output before it is actually invoked.
+echo "==> java -classpath ${TEST_JAR}:${TEST_UTIL_JAR} net.postgis.osgeo.util.Main ${JDBC_URL} ${JDBC_USERNAME} ${JDBC_PASSWORD}"
+
+java -classpath ${TEST_JAR}:${TEST_UTIL_JAR} net.postgis.osgeo.util.Main ${JDBC_URL} ${JDBC_USERNAME} ${JDBC_PASSWORD}
\ No newline at end of file
diff --git a/tools/osgeo-postgis-jdbc-test-util/src/test/java/net/postgis/osgeo/util/UtilTest.java b/tools/osgeo-postgis-jdbc-test-util/src/test/java/net/postgis/osgeo/util/UtilTest.java
new file mode 100644
index 0000000..4cee499
--- /dev/null
+++ b/tools/osgeo-postgis-jdbc-test-util/src/test/java/net/postgis/osgeo/util/UtilTest.java
@@ -0,0 +1,40 @@
+package net.postgis.osgeo.util;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.testng.annotations.Parameters;
+import org.testng.annotations.Test;
+
+
+/**
+ * A test class for testing the primary utility.
+ *
+ * @author Phillip Ross
+ */
+public class UtilTest {
+
+    private static final Logger logger = LoggerFactory.getLogger(UtilTest.class);
+
+
+    @Test
+    @Parameters({"jdbcUrlSystemProperty", "jdbcUsernameSystemProperty", "jdbcPasswordSystemProperty"})
+    public void test(String jdbcUrlSystemProperty,
+                     String jdbcUsernameSystemProperty,
+                     String jdbcPasswordSystemProperty) {
+        logger.debug("jdbcUrlSystemProperty: {}", jdbcUrlSystemProperty);
+        logger.debug("jdbcUsernameSystemProperty: {}", jdbcUsernameSystemProperty);
+        logger.debug("jdbcPasswordSystemProperty: {}", jdbcPasswordSystemProperty);
+
+        String jdbcUrl = System.getProperty(jdbcUrlSystemProperty);
+        String jdbcUsername = System.getProperty(jdbcUsernameSystemProperty);
+        String jdbcPassword = System.getProperty(jdbcPasswordSystemProperty);
+
+        logger.debug("jdbcUrl: {}", jdbcUrl);
+        logger.debug("jdbcUsername: {}", jdbcUsername);
+        logger.debug("jdbcPassword: {}", jdbcPassword);
+
+        Main.main(new String[] {jdbcUrl, jdbcUsername, jdbcPassword});
+    }
+
+
+}
diff --git a/tools/osgeo-postgis-jdbc-test-util/src/test/resources/logback-test.xml b/tools/osgeo-postgis-jdbc-test-util/src/test/resources/logback-test.xml
new file mode 100644
index 0000000..9295c5d
--- /dev/null
+++ b/tools/osgeo-postgis-jdbc-test-util/src/test/resources/logback-test.xml
@@ -0,0 +1,15 @@
+<configuration debug="false">
+
+    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+        <layout class="ch.qos.logback.classic.PatternLayout">
+            <Pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</Pattern>
+        </layout>
+    </appender>
+
+    <root level="debug">
+        <appender-ref ref="STDOUT" />
+    </root>
+
+    <logger name="net.postgis.osgeo.util" level="DEBUG"/>
+
+</configuration>
\ No newline at end of file
diff --git a/tools/osgeo-postgis-jdbc-test-util/src/test/resources/testng.xml b/tools/osgeo-postgis-jdbc-test-util/src/test/resources/testng.xml
new file mode 100644
index 0000000..a969634
--- /dev/null
+++ b/tools/osgeo-postgis-jdbc-test-util/src/test/resources/testng.xml
@@ -0,0 +1,14 @@
+<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
+<suite name="OSGeo PostGIS JDBC Test Util Test Suite" verbose="1">
+
+    <parameter name="jdbcUrlSystemProperty" value="jdbcUrl"/>
+    <parameter name="jdbcUsernameSystemProperty" value="jdbcUsername"/>
+    <parameter name="jdbcPasswordSystemProperty" value="jdbcPassword"/>
+
+    <test name="Util Tests">
+        <classes>
+            <class name="net.postgis.osgeo.util.UtilTest" />
+        </classes>
+    </test>
+
+</suite>
diff --git a/tools/pom.xml b/tools/pom.xml
new file mode 100644
index 0000000..b7e9295
--- /dev/null
+++ b/tools/pom.xml
@@ -0,0 +1,21 @@
+<?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>
+        <artifactId>postgis-java-aggregator</artifactId>
+        <groupId>net.postgis</groupId>
+        <version>2.2.2-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>tools</artifactId>
+    <version>2.2.2-SNAPSHOT</version>
+    <packaging>pom</packaging>
+
+    <name>tools</name>
+    <description>Miscellaneous tools and utilities</description>
+
+    <modules>
+        <module>osgeo-postgis-jdbc-test-util</module>
+    </modules>
+</project>
diff --git a/jdbc/postgis-jdbc.iml b/tools/tools.iml
similarity index 51%
copy from jdbc/postgis-jdbc.iml
copy to tools/tools.iml
index 6175bda..e40baaa 100644
--- a/jdbc/postgis-jdbc.iml
+++ b/tools/tools.iml
@@ -7,22 +7,15 @@
       <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
       <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
       <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
       <excludeFolder url="file://$MODULE_DIR$/target" />
     </content>
     <orderEntry type="inheritedJdk" />
     <orderEntry type="sourceFolder" forTests="false" />
-    <orderEntry type="library" name="Maven: postgresql:postgresql:9.1-901-1.jdbc4" level="project" />
-    <orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.1.3" level="project" />
-    <orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.1.3" level="project" />
-    <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.13" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.testng:testng:6.9.9" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.10" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.1" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: ch.qos.logback:logback-classic:1.1.7" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: ch.qos.logback:logback-core:1.1.7" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.slf4j:slf4j-api:1.7.21" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.testng:testng:6.9.10" level="project" />
     <orderEntry type="library" scope="TEST" name="Maven: com.beust:jcommander:1.48" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.apache.ant:ant:1.7.0" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.apache.ant:ant-launcher:1.7.0" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.yaml:snakeyaml:1.15" level="project" />
     <orderEntry type="library" scope="TEST" name="Maven: org.beanshell:bsh:2.0b4" level="project" />
   </component>
 </module>
\ No newline at end of file

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/postgis-java.git



More information about the Pkg-grass-devel mailing list