Mercurial > dive4elements > river
diff backend/pom.xml @ 9779:3847836c60b5 3.2.x
Improve backend build for different database backends
Use profiles instead of multiple almost identical POMs.
Introduce build-time argument for Docker build.
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Tue, 07 Feb 2023 16:11:43 +0100 |
parents | b57b236c4f4e |
children | 47eee0be5792 |
line wrap: on
line diff
--- a/backend/pom.xml Mon Feb 06 16:57:03 2023 +0100 +++ b/backend/pom.xml Tue Feb 07 16:11:43 2023 +0100 @@ -185,32 +185,69 @@ <artifactId>jts</artifactId> <version>1.11</version> </dependency> - <dependency> - <!-- overwrite dependency of postgis-jdbc --> - <groupId>org.postgresql</groupId> - <artifactId>postgresql</artifactId> - <version>42.0.0.jre7</version> - <scope>runtime</scope> - </dependency> - <dependency> - <groupId>org.postgis</groupId> - <artifactId>postgis-jdbc</artifactId> - <version>1.3.3</version> - <scope>runtime</scope> - <exclusions> - <exclusion> - <groupId>postgresql</groupId> + </dependencies> + + <profiles> + <!-- Build with support for PostgreSQL/PostGIS by default --> + <profile> + <id>postgis</id> + <activation> + <activeByDefault>true</activeByDefault> + </activation> + <dependencies> + <dependency> + <!-- overwrite dependency of postgis-jdbc --> + <groupId>org.postgresql</groupId> <artifactId>postgresql</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>org.hibernatespatial</groupId> - <artifactId>hibernate-spatial-postgis</artifactId> - <version>1.1.1</version> - <scope>runtime</scope> - </dependency> - </dependencies> + <version>42.0.0.jre7</version> + <scope>runtime</scope> + </dependency> + <dependency> + <groupId>org.postgis</groupId> + <artifactId>postgis-jdbc</artifactId> + <version>1.3.3</version> + <scope>runtime</scope> + <exclusions> + <exclusion> + <groupId>postgresql</groupId> + <artifactId>postgresql</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.hibernatespatial</groupId> + <artifactId>hibernate-spatial-postgis</artifactId> + <version>1.1.1</version> + <scope>runtime</scope> + </dependency> + </dependencies> + </profile> + + <!-- Build with Oracle support by setting environment variable ORACLE=true --> + <profile> + <id>oracle</id> + <activation> + <property> + <name>env.ORACLE</name> + <value>true</value> + </property> + </activation> + <dependencies> + <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> + </profile> + </profiles> <repositories> <repository>