Skip to content

Commit

Permalink
#128: jdk11: fixes to make modules build
Browse files Browse the repository at this point in the history
  • Loading branch information
etj committed Mar 12, 2024
1 parent fe5b075 commit 545f839
Show file tree
Hide file tree
Showing 19 changed files with 239 additions and 176 deletions.
1 change: 0 additions & 1 deletion src/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
<maven.compiler.target>8</maven.compiler.target>
<geofence-version>3.7-SNAPSHOT</geofence-version>
<hibernate-version>3.6.9.Final</hibernate-version>
<hibernate-generic-dao-version>1.1.0</hibernate-generic-dao-version>
<hibernate-spatial-version>1.1.3.2</hibernate-spatial-version>
<postgresql.jdbc.version>42.2.18</postgresql.jdbc.version>
<postgis.jdbc.version>1.3.3</postgis.jdbc.version>
Expand Down
38 changes: 22 additions & 16 deletions src/services/core/model-external/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* 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">

Expand All @@ -29,29 +27,37 @@
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
</dependency>

<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
</dependency>
<!-- <dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
</dependency>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
</dependency>
</dependency> -->

<dependency>
<groupId>org.locationtech.jts</groupId>
<artifactId>jts-core</artifactId>
</dependency>

<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
Expand Down Expand Up @@ -97,7 +103,7 @@

<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version>
<version>3.1.0</version>

<executions>
<execution>
Expand Down Expand Up @@ -153,7 +159,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.0.0</version>
<version>3.5.0</version>

<executions>
<execution>
Expand Down
37 changes: 19 additions & 18 deletions src/services/core/model/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,28 @@
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
</dependency>
<!-- <dependency>
<groupId>javax.persistence</groupId>
<artifactId>javax.persistence-api</artifactId>
<version>2.2</version>
</dependency>-->
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
</dependency>

<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
</dependency>

<!-- <dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
</dependency>
</dependency> -->

<dependency>
<groupId>org.hibernate</groupId>
Expand All @@ -61,14 +70,6 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
</dependency>
<dependency>
<groupId>org.locationtech.jts</groupId>
<artifactId>jts-core</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/* (c) 2024 Open Source Geospatial Foundation - all rights reserved
* This code is licensed under the GPL 2.0 license, available at the root
* application directory.
*/
package org.geoserver.geofence.core.model.util;

import org.locationtech.jts.geom.Geometry;
import org.locationtech.jts.io.ParseException;
import org.locationtech.jts.io.WKTReader;

/**
*
* @author etj
*/
public class EWKTParser {

static public Geometry parse(String wkt) throws ParseException {
if (wkt == null) {
return null;
}

WKTReader reader = new WKTReader();
Geometry result;
if (wkt.startsWith("SRID=")) {
String[] areaAr = wkt.split(";");
String srid = areaAr[0].split("=")[1];
result = reader.read(areaAr[1]);
result.setSRID(Integer.valueOf(srid));
} else {
result = reader.read(wkt);
result.setSRID(4326);
}
return result;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,14 @@

import org.geoserver.geofence.core.model.Rule;
import org.geoserver.geofence.core.dao.search.Search;
import org.locationtech.jts.geom.MultiPolygon;
import static org.geoserver.geofence.core.dao.BaseDAOTest.ruleDAO;
import org.geoserver.geofence.core.dao.search.SearchUtil;
import org.geoserver.geofence.core.model.GSUser;
import org.geoserver.geofence.core.model.IPAddressRange;
import org.geoserver.geofence.core.model.LayerAttribute;
import org.geoserver.geofence.core.model.LayerDetails;
import org.geoserver.geofence.core.model.IPAddressRange;
import org.geoserver.geofence.core.model.GSUser;
import org.geoserver.geofence.core.model.enums.SpatialFilterType;
import org.locationtech.jts.geom.GeometryFactory;
import org.locationtech.jts.geom.MultiPolygon;
import org.geoserver.geofence.core.dao.util.SearchUtil;
import org.geoserver.geofence.core.dao.search.SearchUtil;
import org.geoserver.geofence.core.model.enums.AccessType;
import org.geoserver.geofence.core.model.enums.GrantType;
import org.geoserver.geofence.core.model.enums.InsertPosition;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ public String toString() {
sb.append(" cqlW:").append(cqlFilterWrite);
}
if (areaWkt != null) {
sb.append(" areaWkt:defined");
sb.append(" areaWkt:").append(areaWkt.substring(0, 8)).append("...");
}
if (catalogMode != null) {
sb.append(" cmode:").append(catalogMode);
Expand Down
24 changes: 1 addition & 23 deletions src/services/core/services-impl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -151,28 +151,6 @@
<scope>test</scope>
</dependency>

<!-- HIBERNATE-GENERIC-DAO -->
<!-- <dependency>
<groupId>com.googlecode.genericdao</groupId>
<artifactId>dao</artifactId>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
<!-- exclude JPA1 dependency -->
<!-- JPA2 is needed and imported by hibernate3.-->
<exclusion>
<groupId>javax.persistence</groupId>
<artifactId>persistence-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.googlecode.genericdao</groupId>
<artifactId>search-jpa-hibernate</artifactId>
</dependency>-->

<!-- <dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
Expand All @@ -184,7 +162,7 @@

<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<artifactId>javax.servlet-api</artifactId>
<scope>provided</scope>
</dependency>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,9 @@

import org.geoserver.geofence.spi.UserResolver;

import org.springframework.security.core.Authentication;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.context.SecurityContextHolder;

import java.util.*;
import java.util.Map.Entry;
import org.geoserver.geofence.core.model.enums.SpatialFilterType;


/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import org.apache.logging.log4j.Logger;

import org.geoserver.geofence.core.dao.search.Search;
import org.geoserver.geofence.core.dao.search.Filter;
import org.geoserver.geofence.core.model.IPRangeProvider;
import org.geoserver.geofence.services.dto.RuleFilter;
import org.geoserver.geofence.services.exception.BadRequestServiceEx;
Expand Down
Loading

0 comments on commit 545f839

Please sign in to comment.