[PATCH 1 of 2] Backed out changeset b1b48fa7bd80

Wald Commits scm-commit at wald.intevation.org
Tue Feb 7 16:13:37 CET 2023


# HG changeset patch
# User Tom Gottfried <tom at intevation.de>
# Date 1675699023 -3600
#      Mon Feb 06 16:57:03 2023 +0100
# Branch 3.2.x
# Node ID b57b236c4f4e6a9c0c26b726fe2f84705db4d21a
# Parent  f98e5c7775d201b0f962b1ec3730329c8d41bf1d
Backed out changeset b1b48fa7bd80

It turns out that, while this works for PostgreSQL/PostGIS,
it does not with Oracle. Hibernatespatial tries to map spatial
types to PostGIS hibernate types in both cases.

diff -r f98e5c7775d2 -r b57b236c4f4e artifacts/pom-oracle.xml
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/artifacts/pom-oracle.xml	Mon Feb 06 16:57:03 2023 +0100
@@ -0,0 +1,206 @@
+<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>
+
+  <groupId>org.dive4elements.river</groupId>
+  <artifactId>river-artifacts</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <packaging>jar</packaging>
+
+  <name>river-artifacts</name>
+  <url>http://maven.apache.org</url>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+  </properties>
+
+  <build>
+    <plugins>
+      <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-compiler-plugin</artifactId>
+          <version>2.0.2</version>
+          <configuration>
+              <source>1.7</source>
+              <target>1.7</target>
+              <encoding>UTF-8</encoding>
+          </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-javadoc-plugin</artifactId>
+        <version>2.8.1</version>
+        <configuration>
+          <show>private</show>
+          <nohelp>true</nohelp>
+        </configuration>
+      </plugin>
+      <plugin>
+        <artifactId>maven-assembly-plugin</artifactId>
+        <configuration>
+          <descriptors>
+            <descriptor>src/assembly/assembly.xml</descriptor>
+          </descriptors>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-checkstyle-plugin</artifactId>
+        <version>3.0.0</version>
+        <configuration>
+          <configLocation>../checkstyle.xml</configLocation>
+          <encoding>UTF-8</encoding>
+        </configuration>
+        <executions>
+          <execution>
+            <id>validate</id>
+            <phase>validate</phase>
+            <configuration>
+              <consoleOutput>true</consoleOutput>
+              <failsOnError>true</failsOnError>
+            </configuration>
+            <goals>
+              <goal>check</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+
+  <dependencies>
+    <dependency>
+      <groupId>net.sf.ehcache</groupId>
+      <artifactId>ehcache-core</artifactId>
+      <version>2.4.2</version>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>4.13</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>trove</groupId>
+      <artifactId>trove</artifactId>
+      <version>1.1-beta-5</version>
+    </dependency>
+    <dependency>
+      <groupId>net.sf.opencsv</groupId>
+      <artifactId>opencsv</artifactId>
+      <version>2.0</version>
+    </dependency>
+    <dependency>
+      <groupId>org.dive4elements</groupId>
+      <artifactId>artifact-database</artifactId>
+      <version>1.0-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>org.dive4elements</groupId>
+      <artifactId>artifacts-common</artifactId>
+      <version>1.0-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>org.dive4elements.river</groupId>
+      <artifactId>river-backend</artifactId>
+      <version>1.0-SNAPSHOT-ora</version>
+    </dependency>
+    <dependency>
+      <groupId>org.jfree</groupId>
+      <artifactId>jfreechart</artifactId>
+      <version>1.0.15</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.xmlgraphics</groupId>
+      <artifactId>batik-dom</artifactId>
+      <version>1.7</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.xmlgraphics</groupId>
+      <artifactId>batik-svggen</artifactId>
+      <version>1.7</version>
+    </dependency>
+    <dependency>
+      <groupId>com.lowagie</groupId>
+      <artifactId>itext</artifactId>
+      <version>2.1.7</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.commons</groupId>
+      <artifactId>commons-math</artifactId>
+      <version>2.2</version>
+    </dependency>
+    <dependency>
+      <groupId>com.h2database</groupId>
+      <artifactId>h2</artifactId>
+      <version>1.3.158</version>
+    </dependency>
+    <dependency>
+        <groupId>commons-io</groupId>
+        <artifactId>commons-io</artifactId>
+        <version>2.4</version>
+    </dependency>
+    <dependency>
+      <groupId>org.geotools</groupId>
+      <artifactId>gt-shapefile</artifactId>
+      <version>2.7.2</version>
+    </dependency>
+    <dependency>
+      <groupId>org.geotools</groupId>
+      <artifactId>gt-epsg-wkt</artifactId>
+      <version>2.7.2</version>
+    </dependency>
+    <dependency>
+      <groupId>org.geotools</groupId>
+      <artifactId>gt-geojson</artifactId>
+      <version>2.7.2</version>
+    </dependency>
+    <dependency>
+      <groupId>org.geotools</groupId>
+      <artifactId>gt-swing</artifactId>
+      <version>2.7.2</version>
+    </dependency>
+    <dependency>
+      <groupId>org.hibernatespatial</groupId>
+      <artifactId>hibernate-spatial</artifactId>
+      <version>1.1.1</version>
+    </dependency>
+    <dependency>
+      <groupId>org.json</groupId>
+      <artifactId>json</artifactId>
+      <version>20090211</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.velocity</groupId>
+      <artifactId>velocity</artifactId>
+      <version>1.7</version>
+    </dependency>
+    <dependency>
+      <groupId>net.sf.jasperreports</groupId>
+      <artifactId>jasperreports</artifactId>
+      <version>4.5.0</version>
+      <exclusions>
+        <exclusion>
+          <groupId>jfree</groupId>
+          <artifactId>jfreechart</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.groovy</groupId>
+      <artifactId>groovy-all</artifactId>
+      <version>1.6.0</version>
+    </dependency>
+  </dependencies>
+  <repositories>
+    <repository>
+      <id>gt2.repo</id>
+      <name>GeoTools2 Repository including JTS</name>
+      <url>https://repo.osgeo.org/repository/release</url>
+    </repository>
+    <repository>
+      <id>Hibernate Spatial repo</id>
+      <url>http://www.hibernatespatial.org/repository</url>
+    </repository>
+  </repositories>
+</project>
diff -r f98e5c7775d2 -r b57b236c4f4e backend/pom-oracle.xml
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/backend/pom-oracle.xml	Mon Feb 06 16:57:03 2023 +0100
@@ -0,0 +1,183 @@
+<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>
+
+  <groupId>org.dive4elements.river</groupId>
+  <artifactId>river-backend</artifactId>
+  <version>1.0-SNAPSHOT-ora</version>
+  <packaging>jar</packaging>
+
+  <name>river-backend</name>
+  <url>http://maven.apache.org</url>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+  </properties>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <version>2.0.2</version>
+        <configuration>
+          <source>1.7</source>
+          <target>1.7</target>
+          <encoding>UTF-8</encoding>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-dependency-plugin</artifactId>
+        <version>2.10</version>
+        <executions>
+          <execution>
+            <id>analyze</id>
+            <goals>
+              <goal>analyze-only</goal>
+            </goals>
+            <configuration>
+              <failOnWarning>true</failOnWarning>
+              <ignoreNonCompile>true</ignoreNonCompile>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-jar-plugin</artifactId>
+        <version>2.4</version>
+        <configuration>
+          <archive>
+            <manifest>
+              <mainClass>org.dive4elements.river.importer.Importer</mainClass>
+              <packageName>org.dive4elements.river.importer</packageName>
+            </manifest>
+          </archive>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-shade-plugin</artifactId>
+        <version>2.3</version>
+        <configuration>
+          <transformers>
+            <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+              <mainClass>org.dive4elements.river.importer.Importer</mainClass>
+            </transformer>
+          </transformers>
+        </configuration>
+        <executions>
+          <execution>
+            <phase>package</phase>
+            <goals>
+              <goal>shade</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <artifactId>maven-assembly-plugin</artifactId>
+        <configuration>
+          <descriptors>
+            <descriptor>src/assembly/assembly.xml</descriptor>
+          </descriptors>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-checkstyle-plugin</artifactId>
+        <version>3.0.0</version>
+        <configuration>
+          <configLocation>../checkstyle.xml</configLocation>
+          <encoding>UTF-8</encoding>
+        </configuration>
+        <executions>
+          <execution>
+            <id>validate</id>
+            <phase>validate</phase>
+            <configuration>
+              <consoleOutput>true</consoleOutput>
+              <failsOnError>true</failsOnError>
+            </configuration>
+            <goals>
+              <goal>check</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.dive4elements</groupId>
+      <artifactId>artifacts-common</artifactId>
+      <version>1.0-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <!-- Add less unsave version of transitive hibernate dependency -->
+      <groupId>commons-collections</groupId>
+      <artifactId>commons-collections</artifactId>
+      <version>3.2.2</version>
+      <scope>runtime</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.hibernate</groupId>
+      <artifactId>hibernate-core</artifactId>
+      <version>3.6.10.Final</version>
+      <exclusions>
+        <!-- exclude unsafe transitive dependency -->
+        <exclusion>
+          <groupId>commons-collections</groupId>
+          <artifactId>commons-collections</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
+      <groupId>org.hibernate.javax.persistence</groupId>
+      <artifactId>hibernate-jpa-2.0-api</artifactId>
+      <version>1.0.1.Final</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-api</artifactId>
+      <version>2.17.1</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-core</artifactId>
+      <version>2.17.1</version>
+      <scope>runtime</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.commons</groupId>
+      <artifactId>commons-dbcp2</artifactId>
+      <version>2.1.1</version>
+    </dependency>
+    <dependency>
+      <groupId>com.vividsolutions</groupId>
+      <artifactId>jts</artifactId>
+      <version>1.11</version>
+    </dependency>
+    <dependency>
+      <groupId>org.hibernatespatial</groupId>
+      <artifactId>hibernate-spatial-oracle</artifactId>
+      <version>1.1.1</version>
+      <scope>runtime</scope>
+    </dependency>
+    <dependency>
+      <groupId>com.oracle.database.jdbc</groupId>
+      <artifactId>ojdbc8</artifactId>
+      <version>[19,20)</version>
+      <scope>runtime</scope>
+    </dependency>
+  </dependencies>
+
+  <repositories>
+    <repository>
+        <id>Hibernate Spatial repo</id>
+        <url>http://www.hibernatespatial.org/repository</url>
+    </repository>
+  </repositories>
+</project>
diff -r f98e5c7775d2 -r b57b236c4f4e backend/pom.xml
--- a/backend/pom.xml	Fri Jan 20 12:22:24 2023 +0100
+++ b/backend/pom.xml	Mon Feb 06 16:57:03 2023 +0100
@@ -185,8 +185,6 @@
       <artifactId>jts</artifactId>
       <version>1.11</version>
     </dependency>
-
-    <!-- database drivers -->
     <dependency>
       <!-- overwrite dependency of postgis-jdbc -->
       <groupId>org.postgresql</groupId>
@@ -212,18 +210,6 @@
       <version>1.1.1</version>
       <scope>runtime</scope>
     </dependency>
-    <dependency>
-      <groupId>com.oracle.database.jdbc</groupId>
-      <artifactId>ojdbc8</artifactId>
-      <version>[19,20)</version>
-      <scope>runtime</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.hibernatespatial</groupId>
-      <artifactId>hibernate-spatial-oracle</artifactId>
-      <version>1.1.1</version>
-      <scope>runtime</scope>
-    </dependency>
   </dependencies>
 
   <repositories>
diff -r f98e5c7775d2 -r b57b236c4f4e contrib/make_flys_release/bin/make-importer-package.sh
--- a/contrib/make_flys_release/bin/make-importer-package.sh	Fri Jan 20 12:22:24 2023 +0100
+++ b/contrib/make_flys_release/bin/make-importer-package.sh	Mon Feb 06 16:57:03 2023 +0100
@@ -25,13 +25,14 @@
 
 OPTIONS:
    -?, --help          Show this message
+   -o, --oracle        Package is for Oracle.
    VERSION must specify a tag (usually MAYOR.MINOR.PATCH) or a branch name.
    With EXTRAS, a tarball with dependencies can be given.
 EOF
 exit 0
 }
 
-OPTS=`getopt -o ? -l help -n $0 -- "$@"`
+OPTS=`getopt -o ?,o -l help,oracle -n $0 -- "$@"`
 
 if [ $? != 0 ] ; then usage; fi
 eval set -- "$OPTS"
@@ -42,6 +43,9 @@
     "--")
       shift
       break;;
+    "-o"|"--oracle")
+      BUILD_ORACLE="TRUE"
+      shift;;
     *)
       echo "Unknown Option $1"
       usage;;
@@ -77,7 +81,11 @@
 pdflatex importer-manual.tex
 
 # package importer
-mvn -f $SOURCE_DIR/backend/pom.xml clean package assembly:single
+if [ "$BUILD_ORACLE" = "TRUE" ]; then
+    mvn -f $SOURCE_DIR/backend/pom-oracle.xml clean package assembly:single
+else
+    mvn -f $SOURCE_DIR/backend/pom.xml clean package assembly:single
+fi
 
 echo "INFO: create tarball"
 rm -fr $PKG_DIR
diff -r f98e5c7775d2 -r b57b236c4f4e contrib/make_flys_release/make_release.sh
--- a/contrib/make_flys_release/make_release.sh	Fri Jan 20 12:22:24 2023 +0100
+++ b/contrib/make_flys_release/make_release.sh	Mon Feb 06 16:57:03 2023 +0100
@@ -37,6 +37,7 @@
    -t                  Tag the selected branch with given name.
                        Note that \$USER is used as the repository user name
                        for pushing the tags.
+   -o, --oracle        Release is for oracle.
    TARGET must specify a tag (usually MAYOR.MINOR.PATCH) or a branch name.
 EOF
 exit 0
@@ -55,8 +56,8 @@
 # customizable variables
 ELBE_MODEL_UUID=${ELBE_MODEL_UUID:-1a4825f6-925f-11e3-8165-001f29e71d12}
 
-OPTS=`getopt -o ?w:,?t: \
-     -l help \
+OPTS=`getopt -o ?w:,?t:,o \
+     -l help,oracle \
      -n $0 -- "$@"`
 
 if [ $? != 0 ] ; then usage; fi
@@ -71,6 +72,9 @@
     "-w")
       WORK_DIR=$2
       shift 2;;
+    "-o"|"--oracle")
+      BUILD_ORACLE="TRUE"
+      shift;;
     "-t")
       DO_TAG=$2
       shift 2;;
@@ -269,7 +273,14 @@
 echo "INFO: compile and build sources"
 cp $WORK_DIR/wsplgen-linux-64bit-static \
     $FLYS_SOURCE_DIR/river/artifacts/bin/wsplgen
-mvn -f $FLYS_SOURCE_DIR/river/artifacts/pom.xml package assembly:single
+
+if [ "$BUILD_ORACLE" = "TRUE" ]; then
+    mvn -f $FLYS_SOURCE_DIR/river/backend/pom-oracle.xml clean compile install
+    mvn -f $FLYS_SOURCE_DIR/river/artifacts/pom-oracle.xml \
+        package assembly:single
+else
+    mvn -f $FLYS_SOURCE_DIR/river/artifacts/pom.xml package assembly:single
+fi
 mvn -f $FLYS_SOURCE_DIR/river/gwt-client/pom.xml clean compile package
 
 


More information about the Dive4Elements-commits mailing list