-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bump Hibernate Spatial to 1.1.3.2. Add specific tests for Postgis
- Loading branch information
Showing
8 changed files
with
237 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,159 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/* (c) 2021 Open Source Geospatial Foundation - all rights reserved | ||
* This code is licensed under the GPL 2.0 license, available at the root | ||
* application directory. | ||
*/ | ||
--> | ||
<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/maven-v4_0_0.xsd"> | ||
|
||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>org.geoserver.geofence</groupId> | ||
<artifactId>geofence-core</artifactId> | ||
<version>3.4-SNAPSHOT</version> | ||
</parent> | ||
|
||
<groupId>org.geoserver.geofence</groupId> | ||
<artifactId>geofence-persistence-pg-test</artifactId> | ||
<packaging>jar</packaging> | ||
<name>GeoFence - Core - Persistence PostGIS test</name> | ||
|
||
<dependencies> | ||
|
||
<dependency> | ||
<groupId>org.geoserver.geofence</groupId> | ||
<artifactId>geofence-model-internal</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.geoserver.geofence</groupId> | ||
<artifactId>geofence-persistence</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<!-- we need this dep to have a meaningful stacktrace --> | ||
<groupId>org.geoserver.geofence</groupId> | ||
<artifactId>geofence-persistence</artifactId> | ||
<classifier>test-sources</classifier> | ||
<type>test-jar</type> | ||
<version>${project.version}</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<!-- we need this dep to have a meaningful stacktrace --> | ||
<groupId>org.hibernatespatial</groupId> | ||
<artifactId>hibernate-spatial</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.hibernatespatial</groupId> | ||
<artifactId>hibernate-spatial-postgis</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.postgis</groupId> | ||
<artifactId>postgis-jdbc</artifactId> | ||
<exclusions> | ||
<exclusion> | ||
<groupId>org.postgis</groupId> | ||
<artifactId>postgis-stubs</artifactId> | ||
</exclusion> | ||
</exclusions> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.postgresql</groupId> | ||
<artifactId>postgresql</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
</dependencies> | ||
|
||
<build> | ||
<testSourceDirectory>${project.build.directory}/original-test-sources</testSourceDirectory> | ||
|
||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-surefire-plugin</artifactId> | ||
<version>2.22.2</version> | ||
</plugin> | ||
|
||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-dependency-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>unpack</id> | ||
<phase>generate-sources</phase> | ||
<goals> | ||
<goal>unpack</goal> | ||
</goals> | ||
<configuration> | ||
<artifactItems> | ||
<artifactItem> | ||
<groupId>org.geoserver.geofence</groupId> | ||
<artifactId>geofence-persistence</artifactId> | ||
<classifier>test-sources</classifier> | ||
<type>test-jar</type> | ||
<version>${project.version}</version> | ||
|
||
<outputDirectory>${project.build.directory}/original-test-sources</outputDirectory> | ||
|
||
<!-- we have our one --> | ||
<excludes>geofence-datasource-ovr.properties</excludes> | ||
|
||
</artifactItem> | ||
</artifactItems> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
|
||
|
||
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>hibernate3-maven-plugin</artifactId> | ||
<version>3.0</version> | ||
|
||
<executions> | ||
<execution> | ||
<phase>generate-sources</phase> | ||
<goals> | ||
<goal>run</goal> | ||
</goals> | ||
<!--<phase>process-classes</phase>--> | ||
</execution> | ||
</executions> | ||
<configuration> | ||
<hibernatetool destdir="target/classes"> | ||
|
||
<annotationconfiguration configurationfile="src/test/resources/hibernate.cfg.xml"/> | ||
<!--<jdbcconfiguration packagename="it" />--> | ||
<!--<hbm2hbmxml destdir="target/generated-sources/hibernate" />--> | ||
<!--<hbm2cfgxml />--> | ||
<!--<hbm2dao jdk5="true" ejb3="true" />--> | ||
<!--hbm2ddl--> | ||
<classpath> | ||
<path location="target/classes"/> | ||
</classpath> | ||
|
||
</hibernatetool> | ||
|
||
</configuration> | ||
</plugin> | ||
</plugins> | ||
|
||
</build> | ||
|
||
</project> |
16 changes: 16 additions & 0 deletions
16
src/services/core/persistence-pg-test/src/test/resources/geofence-datasource-ovr.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# /* (c) 2014 Open Source Geospatial Foundation - all rights reserved | ||
# * This code is licensed under the GPL 2.0 license, available at the root | ||
# * application directory. | ||
# */ | ||
# | ||
|
||
geofenceEntityManagerFactory.jpaPropertyMap[hibernate.hbm2ddl.auto]=create-drop | ||
geofenceVendorAdapter.generateDdl=true | ||
geofenceVendorAdapter.showSql=true | ||
|
||
geofenceVendorAdapter.databasePlatform=org.hibernatespatial.postgis.PostgisDialect | ||
geofenceDataSource.driverClassName=org.postgresql.Driver | ||
geofenceDataSource.url=jdbc:postgresql://localhost:5432/geofence_test | ||
geofenceDataSource.username=geofence_test | ||
geofenceDataSource.password=geofence_test | ||
#geofenceEntityManagerFactory.jpaPropertyMap[hibernate.default_schema]=geofence_test |
15 changes: 15 additions & 0 deletions
15
src/services/core/persistence-pg-test/src/test/resources/log4j.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# /* (c) 2014 Open Source Geospatial Foundation - all rights reserved | ||
# * This code is licensed under the GPL 2.0 license, available at the root | ||
# * application directory. | ||
# */ | ||
# | ||
log4j.rootLogger=INFO, consoleAppender | ||
|
||
log4j.appender.consoleAppender=org.apache.log4j.ConsoleAppender | ||
log4j.appender.consoleAppender.layout=org.apache.log4j.PatternLayout | ||
log4j.appender.consoleAppender.layout.ConversionPattern=%p %d{yyyy-MM-dd HH:mm:ss.SSS} %c::%M - %m%n | ||
|
||
log4j.logger.org.hibernate=INFO | ||
log4j.logger.com.trg=INFO | ||
|
||
log4j.logger.org.geoserver.geofence=DEBUG |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters