diff --git a/buildSrc/src/main/groovy/hale.java-conventions.gradle b/buildSrc/src/main/groovy/hale.java-conventions.gradle
index 22d43a6634..33f32aa2ea 100644
--- a/buildSrc/src/main/groovy/hale.java-conventions.gradle
+++ b/buildSrc/src/main/groovy/hale.java-conventions.gradle
@@ -32,6 +32,9 @@ dependencies {
testRuntimeOnly libs.logback.core
testRuntimeOnly libs.logback.classic
testRuntimeOnly project(':common:plugins:eu.esdihumboldt.hale.common.logback.config.test')
+
+ // make offline resources available to all tests
+ testRuntimeOnly project(':util:features:eu.esdihumboldt.util.feature.resource')
}
task sourcesJar(type: Jar) {
diff --git a/common/plugins/eu.esdihumboldt.hale.common.align.groovy/build.gradle b/common/plugins/eu.esdihumboldt.hale.common.align.groovy/build.gradle
index 332ddafd44..56c80a60a4 100644
--- a/common/plugins/eu.esdihumboldt.hale.common.align.groovy/build.gradle
+++ b/common/plugins/eu.esdihumboldt.hale.common.align.groovy/build.gradle
@@ -27,4 +27,6 @@ dependencies {
testImplementation testLibs.junit4
testImplementation project(':common:plugins:eu.esdihumboldt.hale.common.schema.groovy')
testImplementation project(':util:plugins:eu.esdihumboldt.util.test')
+
+ testRuntimeOnly project(':common:plugins:eu.esdihumboldt.hale.common.filter')
}
diff --git a/common/plugins/eu.esdihumboldt.hale.common.align.merge/build.gradle b/common/plugins/eu.esdihumboldt.hale.common.align.merge/build.gradle
index d851ac1080..5d14a376cb 100644
--- a/common/plugins/eu.esdihumboldt.hale.common.align.merge/build.gradle
+++ b/common/plugins/eu.esdihumboldt.hale.common.align.merge/build.gradle
@@ -29,5 +29,13 @@ dependencies {
testImplementation testLibs.junit4
+ testImplementation libs.jakarta.xml.bind.api
+
testImplementation project(':common:plugins:eu.esdihumboldt.hale.common.align.merge.test')
+ testImplementation project(':common:plugins:eu.esdihumboldt.hale.common.instance.index')
+ testImplementation project(':common:plugins:eu.esdihumboldt.hale.common.instance.groovy')
+
+ // unsafe providers
+ testRuntimeOnly project(':io:plugins:eu.esdihumboldt.hale.io.schemabuilder')
+ testRuntimeOnly project(':io:plugins:eu.esdihumboldt.hale.io.instancebuilder')
}
diff --git a/common/plugins/eu.esdihumboldt.hale.common.convert.core/src/eu/esdihumboldt/hale/common/convert/core/StringToLocalDateConverter.java b/common/plugins/eu.esdihumboldt.hale.common.convert.core/src/eu/esdihumboldt/hale/common/convert/core/StringToLocalDateConverter.java
index 3f5477fd12..175a6baea5 100644
--- a/common/plugins/eu.esdihumboldt.hale.common.convert.core/src/eu/esdihumboldt/hale/common/convert/core/StringToLocalDateConverter.java
+++ b/common/plugins/eu.esdihumboldt.hale.common.convert.core/src/eu/esdihumboldt/hale/common/convert/core/StringToLocalDateConverter.java
@@ -1,14 +1,14 @@
/*
* Copyright (c) 2020 wetransform GmbH
- *
+ *
* All rights reserved. This program and the accompanying materials are made
* available under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of the License,
* or (at your option) any later version.
- *
+ *
* You should have received a copy of the GNU Lesser General Public License
* along with this distribution. If not, see .
- *
+ *
* Contributors:
* wetransform GmbH
*/
@@ -16,20 +16,29 @@
package eu.esdihumboldt.hale.common.convert.core;
import java.time.LocalDate;
+import java.time.format.DateTimeFormatter;
+import java.time.format.DateTimeParseException;
/**
* Convert a {@link String} to a {@link LocalDate}.
- *
+ *
* @author Simon Templer
*/
public class StringToLocalDateConverter extends AbstractStringToDateTimeTypeConverter {
+ private static DateTimeFormatter SLASH_FORMATTER = DateTimeFormatter.ofPattern("yyyy/MM/dd");
+
/**
* @see eu.esdihumboldt.hale.common.convert.core.AbstractStringToDateTimeTypeConverter#parse(java.lang.String)
*/
@Override
protected LocalDate parse(String source) {
- return LocalDate.parse(source);
+ try {
+ return LocalDate.parse(source);
+ } catch (DateTimeParseException e) {
+ // try alternative format
+ return LocalDate.parse(source, SLASH_FORMATTER);
+ }
}
}
diff --git a/common/plugins/eu.esdihumboldt.hale.common.core/build.gradle b/common/plugins/eu.esdihumboldt.hale.common.core/build.gradle
index 7e593c7924..293ce1d9a6 100644
--- a/common/plugins/eu.esdihumboldt.hale.common.core/build.gradle
+++ b/common/plugins/eu.esdihumboldt.hale.common.core/build.gradle
@@ -39,5 +39,8 @@ dependencies {
implementation libs.model.project
testImplementation testLibs.junit4
+
+ testImplementation project(':util:plugins:eu.esdihumboldt.util.test')
+
testImplementation project(':ext:nonosgi:org.eclipse.equinox.nonosgi.registry')
}
diff --git a/common/plugins/eu.esdihumboldt.hale.common.core/test/eu/esdihumboldt/hale/common/core/HalePlatformTest.java b/common/plugins/eu.esdihumboldt.hale.common.core/test/eu/esdihumboldt/hale/common/core/HalePlatformTest.java
index 3771d8f2f2..e146b589c6 100644
--- a/common/plugins/eu.esdihumboldt.hale.common.core/test/eu/esdihumboldt/hale/common/core/HalePlatformTest.java
+++ b/common/plugins/eu.esdihumboldt.hale.common.core/test/eu/esdihumboldt/hale/common/core/HalePlatformTest.java
@@ -21,6 +21,7 @@
import org.eclipse.equinox.nonosgi.registry.RegistryFactoryHelper;
import org.junit.BeforeClass;
+import org.junit.Ignore;
import org.junit.Test;
import org.osgi.framework.Version;
@@ -39,6 +40,7 @@ public static void init() {
@SuppressWarnings("javadoc")
@Test
+ @Ignore("Does not work in dev environment because manifest file is not present yet")
public void testGetVersion() {
Version version = HalePlatform.getCoreVersion();
assertNotNull(version);
diff --git a/common/plugins/eu.esdihumboldt.hale.common.core/test/eu/esdihumboldt/hale/common/core/io/impl/ValueMapTypeTest.groovy b/common/plugins/eu.esdihumboldt.hale.common.core/test/eu/esdihumboldt/hale/common/core/io/impl/ValueMapTypeTest.groovy
index 43c0bc2dc3..f37344b0f4 100644
--- a/common/plugins/eu.esdihumboldt.hale.common.core/test/eu/esdihumboldt/hale/common/core/io/impl/ValueMapTypeTest.groovy
+++ b/common/plugins/eu.esdihumboldt.hale.common.core/test/eu/esdihumboldt/hale/common/core/io/impl/ValueMapTypeTest.groovy
@@ -21,8 +21,7 @@ import eu.esdihumboldt.hale.common.core.io.HaleIO
import eu.esdihumboldt.hale.common.core.io.Value
import eu.esdihumboldt.hale.common.core.io.ValueList
import eu.esdihumboldt.hale.common.core.io.ValueMap
-import org.eclipse.equinox.nonosgi.registry.RegistryFactoryHelper
-import org.junit.BeforeClass
+import eu.esdihumboldt.util.test.AbstractPlatformTest
import org.junit.Test
import org.w3c.dom.Element
@@ -31,13 +30,7 @@ import org.w3c.dom.Element
*
* @author Simon Templer
*/
-class ValueMapTypeTest {
-
- @BeforeClass
- static void init() {
- // initialize registry
- RegistryFactoryHelper.getRegistry()
- }
+class ValueMapTypeTest extends AbstractPlatformTest {
/**
* Test if a map containing simple values and complex values is the same
diff --git a/common/plugins/eu.esdihumboldt.hale.common.core/test/eu/esdihumboldt/hale/common/core/io/impl/ValuePropertiesTypeTest.groovy b/common/plugins/eu.esdihumboldt.hale.common.core/test/eu/esdihumboldt/hale/common/core/io/impl/ValuePropertiesTypeTest.groovy
index 82b74d2b56..67c7f280c7 100644
--- a/common/plugins/eu.esdihumboldt.hale.common.core/test/eu/esdihumboldt/hale/common/core/io/impl/ValuePropertiesTypeTest.groovy
+++ b/common/plugins/eu.esdihumboldt.hale.common.core/test/eu/esdihumboldt/hale/common/core/io/impl/ValuePropertiesTypeTest.groovy
@@ -21,6 +21,7 @@ import eu.esdihumboldt.hale.common.core.io.HaleIO
import eu.esdihumboldt.hale.common.core.io.Value
import eu.esdihumboldt.hale.common.core.io.ValueList
import eu.esdihumboldt.hale.common.core.io.ValueProperties
+import eu.esdihumboldt.util.test.AbstractPlatformTest
import org.eclipse.equinox.nonosgi.registry.RegistryFactoryHelper
import org.junit.BeforeClass
import org.junit.Test
@@ -32,13 +33,7 @@ import org.w3c.dom.Element
*
* @author Simon Templer
*/
-class ValuePropertiesTypeTest {
-
- @BeforeClass
- static void init() {
- // initialize registry
- RegistryFactoryHelper.getRegistry()
- }
+class ValuePropertiesTypeTest extends AbstractPlatformTest {
/**
* Test if a simple properties map containing only simple values is the same
diff --git a/common/plugins/eu.esdihumboldt.hale.common.filter/test/eu/esdihumboldt/hale/common/filter/AbstractFilterTest.groovy b/common/plugins/eu.esdihumboldt.hale.common.filter/test/eu/esdihumboldt/hale/common/filter/AbstractFilterTest.groovy
index f1f09b8f5a..f33941506d 100644
--- a/common/plugins/eu.esdihumboldt.hale.common.filter/test/eu/esdihumboldt/hale/common/filter/AbstractFilterTest.groovy
+++ b/common/plugins/eu.esdihumboldt.hale.common.filter/test/eu/esdihumboldt/hale/common/filter/AbstractFilterTest.groovy
@@ -1,19 +1,19 @@
/*
* Copyright (c) 2017 wetransform GmbH
- *
+ *
* All rights reserved. This program and the accompanying materials are made
* available under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of the License,
* or (at your option) any later version.
- *
+ *
* You should have received a copy of the GNU Lesser General Public License
* along with this distribution. If not, see .
- *
+ *
* Contributors:
* wetransform GmbH
*/
-package eu.esdihumboldt.hale.common.filter;
+package eu.esdihumboldt.hale.common.filter
import static org.junit.Assert.*
@@ -24,6 +24,7 @@ import eu.esdihumboldt.hale.common.instance.model.Instance
import eu.esdihumboldt.hale.common.schema.groovy.SchemaBuilder
import eu.esdihumboldt.hale.common.schema.model.Schema
import eu.esdihumboldt.hale.common.schema.model.TypeDefinition
+import eu.esdihumboldt.util.test.AbstractPlatformTest
import java.text.SimpleDateFormat
import org.junit.Before
import org.locationtech.jts.geom.Coordinate
@@ -32,10 +33,10 @@ import org.locationtech.jts.geom.GeometryFactory
/**
* Base class for filter tests providing test instances.
- *
+ *
* @author Simon Templer
*/
-abstract class AbstractFilterTest {
+abstract class AbstractFilterTest extends AbstractPlatformTest {
private static final String defaultNs = "http://www.my.namespace"
diff --git a/common/plugins/eu.esdihumboldt.hale.common.filter/test/eu/esdihumboldt/hale/common/filter/FilterTest.java b/common/plugins/eu.esdihumboldt.hale.common.filter/test/eu/esdihumboldt/hale/common/filter/FilterTest.java
index 66db8cd6c1..09474b3506 100644
--- a/common/plugins/eu.esdihumboldt.hale.common.filter/test/eu/esdihumboldt/hale/common/filter/FilterTest.java
+++ b/common/plugins/eu.esdihumboldt.hale.common.filter/test/eu/esdihumboldt/hale/common/filter/FilterTest.java
@@ -1,14 +1,14 @@
/*
* Copyright (c) 2012 Data Harmonisation Panel
- *
+ *
* All rights reserved. This program and the accompanying materials are made
* available under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of the License,
* or (at your option) any later version.
- *
+ *
* You should have received a copy of the GNU Lesser General Public License
* along with this distribution. If not, see .
- *
+ *
* Contributors:
* HUMBOLDT EU Integrated Project #030962
* Data Harmonisation Panel
@@ -44,6 +44,7 @@
import eu.esdihumboldt.hale.io.shp.reader.internal.ShapeSchemaReader;
import eu.esdihumboldt.hale.io.xsd.reader.XmlSchemaReader;
import eu.esdihumboldt.util.io.IOUtils;
+import eu.esdihumboldt.util.test.AbstractPlatformTest;
import java.io.IOException;
import java.net.URI;
import java.nio.file.Path;
@@ -56,11 +57,11 @@
/**
* TODO Type description
- *
+ *
* @author Basti
*/
@SuppressWarnings({ "restriction", "javadoc" })
-public class FilterTest {
+public class FilterTest extends AbstractPlatformTest {
static InstanceCollection complexinstances;
static boolean init = false;
@@ -148,7 +149,7 @@ public void simpleSchemaTestCQL() throws Exception {
/**
* Test loading a simple XML file with one instance
- *
+ *
* @throws Exception if an error occurs
*/
@Ignore
@@ -211,15 +212,15 @@ public void testComplexInstancesCQL() throws Exception {
* ((getClass().getResource("/testdata/inspire3/HydroPhysicalWaters.xsd"
* ).toURI()))); IOReport report = reader.execute(null);
* assertTrue(report.isSuccess()); Schema schema = reader.getSchema();
- *
+ *
* StreamGmlReader instanceReader = new GmlInstanceReader();
* instanceReader.setSource(new DefaultInputSupplier(getClass().getResource
* ("/testdata/out/transformWrite_ERM_HPW.gml").toURI()));
* instanceReader.setSourceSchema(schema);
- *
+ *
* instanceReader.validate(); report = instanceReader.execute(null);
* assertTrue(report.isSuccess());
- *
+ *
* InstanceCollection instances = instanceReader.getInstances();
* assertFalse(instances.isEmpty());
*/
@@ -423,7 +424,7 @@ private InstanceCollection validateSchemaAndInstanceReader(Path shpTempFile)
/**
* Test loading a simple XML file with one instance
- *
+ *
* @throws Exception if an error occurs
*/
@Ignore
@@ -483,15 +484,15 @@ public void testComplexInstancesECQL() throws Exception {
* ((getClass().getResource("/testdata/inspire3/HydroPhysicalWaters.xsd"
* ).toURI()))); IOReport report = reader.execute(null);
* assertTrue(report.isSuccess()); Schema schema = reader.getSchema();
- *
+ *
* StreamGmlReader instanceReader = new GmlInstanceReader();
* instanceReader.setSource(new DefaultInputSupplier(getClass().getResource
* ("/testdata/out/transformWrite_ERM_HPW.gml").toURI()));
* instanceReader.setSourceSchema(schema);
- *
+ *
* instanceReader.validate(); report = instanceReader.execute(null);
* assertTrue(report.isSuccess());
- *
+ *
* InstanceCollection instances = instanceReader.getInstances();
* assertFalse(instances.isEmpty());
*/
diff --git a/common/plugins/eu.esdihumboldt.hale.common.instance/build.gradle b/common/plugins/eu.esdihumboldt.hale.common.instance/build.gradle
index eb826dcbbe..34aa29b2e3 100644
--- a/common/plugins/eu.esdihumboldt.hale.common.instance/build.gradle
+++ b/common/plugins/eu.esdihumboldt.hale.common.instance/build.gradle
@@ -31,10 +31,14 @@ dependencies {
testImplementation testLibs.junit4
+ testRuntimeOnly libs.geotools.epsg
+
testImplementation project(':io:plugins:eu.esdihumboldt.hale.io.gml')
testImplementation project(':io:plugins:eu.esdihumboldt.hale.io.shp')
testImplementation project(':io:plugins:eu.esdihumboldt.hale.io.xsd')
+ testImplementation project(':util:plugins:eu.esdihumboldt.util.test')
+
testImplementation libs.spring.core
testRuntimeOnly project(':common:plugins:eu.esdihumboldt.hale.common.convert')
}
diff --git a/common/plugins/eu.esdihumboldt.hale.common.instance/test/eu/esdihumboldt/hale/common/instance/helper/PropertyResolverTest.java b/common/plugins/eu.esdihumboldt.hale.common.instance/test/eu/esdihumboldt/hale/common/instance/helper/PropertyResolverTest.java
index 24bd3040c9..3b6883cbfa 100644
--- a/common/plugins/eu.esdihumboldt.hale.common.instance/test/eu/esdihumboldt/hale/common/instance/helper/PropertyResolverTest.java
+++ b/common/plugins/eu.esdihumboldt.hale.common.instance/test/eu/esdihumboldt/hale/common/instance/helper/PropertyResolverTest.java
@@ -1,14 +1,14 @@
/*
* Copyright (c) 2012 Data Harmonisation Panel
- *
+ *
* All rights reserved. This program and the accompanying materials are made
* available under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of the License,
* or (at your option) any later version.
- *
+ *
* You should have received a copy of the GNU Lesser General Public License
* along with this distribution. If not, see .
- *
+ *
* Contributors:
* HUMBOLDT EU Integrated Project #030962
* Data Harmonisation Panel
@@ -41,6 +41,7 @@
import eu.esdihumboldt.hale.io.gml.reader.internal.StreamGmlReader;
import eu.esdihumboldt.hale.io.gml.reader.internal.XmlInstanceReader;
import eu.esdihumboldt.hale.io.xsd.reader.XmlSchemaReader;
+import eu.esdihumboldt.util.test.AbstractPlatformTest;
import java.io.IOException;
import java.net.URI;
import javax.xml.namespace.QName;
@@ -51,11 +52,11 @@
/**
* Tests for {@link PropertyResolver}
- *
+ *
* @author Sebastian Reinhardt
*/
@SuppressWarnings("restriction")
-public class PropertyResolverTest {
+public class PropertyResolverTest extends AbstractPlatformTest {
/**
* Wait for needed services to be running
@@ -73,7 +74,7 @@ public boolean evaluate() {
/**
* Test loading a simple XML file with one instance
- *
+ *
* @throws Exception if an error occurs
*/
@Test
@@ -116,7 +117,7 @@ public void testLoadShiporder() throws Exception {
/**
* Test with a wrapper instance that has no definition itself.
- *
+ *
* @throws Exception if an error occurs
*/
@Test
@@ -145,7 +146,7 @@ public void testLoadShiporderWrapped() throws Exception {
/**
* Test with complex instances.
- *
+ *
* @throws Exception if an error occurs
*/
@Ignore
diff --git a/common/plugins/eu.esdihumboldt.hale.common.test/src/eu/esdihumboldt/hale/common/test/TestUtil.java b/common/plugins/eu.esdihumboldt.hale.common.test/src/eu/esdihumboldt/hale/common/test/TestUtil.java
index 7a50e240dc..68b4793fb8 100644
--- a/common/plugins/eu.esdihumboldt.hale.common.test/src/eu/esdihumboldt/hale/common/test/TestUtil.java
+++ b/common/plugins/eu.esdihumboldt.hale.common.test/src/eu/esdihumboldt/hale/common/test/TestUtil.java
@@ -73,7 +73,13 @@ public static Schema loadSchema(URI location)
throws IOProviderConfigurationException, IOException {
DefaultInputSupplier input = new DefaultInputSupplier(location);
- SchemaReader reader = HaleIO.findIOProvider(SchemaReader.class, input, location.getPath());
+ String path = location.getPath();
+ if (path == null && location.getScheme().equals("jar")) {
+ // workaround for JAR URLs to include an extension if possible
+ path = location.getSchemeSpecificPart();
+ }
+
+ SchemaReader reader = HaleIO.findIOProvider(SchemaReader.class, input, path);
if (reader == null) {
// assume XML schema as default
reader = new XmlSchemaReader();
@@ -140,8 +146,13 @@ public static InstanceCollection loadInstances(URI location, Schema types)
throws IOProviderConfigurationException, IOException {
DefaultInputSupplier input = new DefaultInputSupplier(location);
- InstanceReader instanceReader = HaleIO.findIOProvider(InstanceReader.class, input,
- location.getPath());
+ String path = location.getPath();
+ if (path == null && location.getScheme().equals("jar")) {
+ // workaround for JAR URLs to include an extension if possible
+ path = location.getSchemeSpecificPart();
+ }
+
+ InstanceReader instanceReader = HaleIO.findIOProvider(InstanceReader.class, input, path);
if (instanceReader == null) {
// assume XML as default
instanceReader = new XmlInstanceReader();
diff --git a/cst/plugins/eu.esdihumboldt.cst.functions.geometric/test/eu/esdihumboldt/cst/functions/geometric/test/join/SpatialJoinParameterTest.groovy b/cst/plugins/eu.esdihumboldt.cst.functions.geometric/test/eu/esdihumboldt/cst/functions/geometric/test/join/SpatialJoinParameterTest.groovy
index 7b66c3a570..b7e0fcc853 100644
--- a/cst/plugins/eu.esdihumboldt.cst.functions.geometric/test/eu/esdihumboldt/cst/functions/geometric/test/join/SpatialJoinParameterTest.groovy
+++ b/cst/plugins/eu.esdihumboldt.cst.functions.geometric/test/eu/esdihumboldt/cst/functions/geometric/test/join/SpatialJoinParameterTest.groovy
@@ -15,6 +15,8 @@
package eu.esdihumboldt.cst.functions.geometric.test.join
+import static org.junit.Assert.*
+
import eu.esdihumboldt.cst.functions.geometric.join.SpatialJoinParameter
import eu.esdihumboldt.cst.functions.geometric.join.SpatialJoinParameter.SpatialJoinCondition
import eu.esdihumboldt.cst.functions.geometric.join.SpatialJoinParameterType
diff --git a/cst/plugins/eu.esdihumboldt.cst.test/build.gradle b/cst/plugins/eu.esdihumboldt.cst.test/build.gradle
index 1f3ea16086..7390aab5fa 100644
--- a/cst/plugins/eu.esdihumboldt.cst.test/build.gradle
+++ b/cst/plugins/eu.esdihumboldt.cst.test/build.gradle
@@ -20,4 +20,10 @@ dependencies {
implementation project(':common:plugins:eu.esdihumboldt.hale.common.instance.index')
api project(':util:plugins:eu.esdihumboldt.util.test')
+
+ runtimeOnly project(':io:features:eu.esdihumboldt.hale.io.feature.core')
+
+ // unsafe providers
+ runtimeOnly project(':io:plugins:eu.esdihumboldt.hale.io.schemabuilder')
+ runtimeOnly project(':io:plugins:eu.esdihumboldt.hale.io.instancebuilder')
}
diff --git a/cst/plugins/eu.esdihumboldt.cst/build.gradle b/cst/plugins/eu.esdihumboldt.cst/build.gradle
index 478f71845b..39be11e45b 100644
--- a/cst/plugins/eu.esdihumboldt.cst/build.gradle
+++ b/cst/plugins/eu.esdihumboldt.cst/build.gradle
@@ -37,4 +37,6 @@ dependencies {
testImplementation project(':common:plugins:eu.esdihumboldt.hale.common.instance.index')
testImplementation project(':cst:plugins:eu.esdihumboldt.cst.test')
testImplementation project(':util:plugins:eu.esdihumboldt.util.test')
+
+ testRuntimeOnly project(':common:plugins:eu.esdihumboldt.hale.common.groovy.sandbox.enable')
}
diff --git a/ext/adv/eu.esdihumboldt.hale.adv.merge/build.gradle b/ext/adv/eu.esdihumboldt.hale.adv.merge/build.gradle
index 2c2348e870..84902ec0e4 100644
--- a/ext/adv/eu.esdihumboldt.hale.adv.merge/build.gradle
+++ b/ext/adv/eu.esdihumboldt.hale.adv.merge/build.gradle
@@ -20,4 +20,8 @@ dependencies {
testImplementation project(':common:plugins:eu.esdihumboldt.hale.common.headless')
testImplementation project(':common:plugins:eu.esdihumboldt.hale.common.headless.test')
testImplementation project(':common:plugins:eu.esdihumboldt.hale.common.align.merge.test')
+
+ // unsafe providers
+ testRuntimeOnly project(':io:plugins:eu.esdihumboldt.hale.io.schemabuilder')
+ testRuntimeOnly project(':io:plugins:eu.esdihumboldt.hale.io.instancebuilder')
}
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index 04890029f0..3385a896b7 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -154,6 +154,7 @@ skos = {module = "eu.esdihumboldt.unpuzzled:org.semanticweb.owlapi.osgi.skos", v
deegree-featurestore-sql = {module = "org.deegree:deegree-featurestore-sql", version.ref = "deegree"}
deegree-postgis = {module = "org.deegree:deegree-sqldialect-postgis", version.ref = "deegree"}
+deegree-cs = {module = "org.deegree:deegree-core-cs", version.ref = "deegree"}
staxon = {module = "de.odysseus.staxon:staxon", version = "1.3"}
@@ -196,7 +197,7 @@ hc-api = ['hc-users', 'hc-projects', 'hc-projectstore', 'hc-buckets']
geopackage = ['geopackage-core', 'geopackage-lib']
-deegree = ['deegree-featurestore-sql', 'deegree-postgis']
+deegree = ['deegree-featurestore-sql', 'deegree-postgis', 'deegree-cs']
poi = ['poi-core', 'poi-ooxml', 'poi-ooxml-lite']
diff --git a/gradle/test-libs.versions.toml b/gradle/test-libs.versions.toml
index a4a317fd8d..78f0c017b4 100644
--- a/gradle/test-libs.versions.toml
+++ b/gradle/test-libs.versions.toml
@@ -13,3 +13,5 @@ allure-junit = {module = "ru.yandex.qatools.allure:allure-junit-adaptor", versio
assertj = {module = "org.assertj:assertj-core", version.ref = "assertj"}
testcontainers-core = {module = "org.testcontainers:testcontainers", version.ref = "testcontainers"}
+
+junit-system-rules = {module = "com.github.stefanbirkner:system-rules", version = "1.19.0"}
diff --git a/io/plugins/eu.esdihumboldt.hale.io.codelist.xml/build.gradle b/io/plugins/eu.esdihumboldt.hale.io.codelist.xml/build.gradle
index d5b7753def..411c8dc407 100644
--- a/io/plugins/eu.esdihumboldt.hale.io.codelist.xml/build.gradle
+++ b/io/plugins/eu.esdihumboldt.hale.io.codelist.xml/build.gradle
@@ -24,4 +24,6 @@ dependencies {
implementation project(':util:plugins:eu.esdihumboldt.util.resource')
implementation project(':ext:nonosgi:eu.esdihumboldt.hale.util.nonosgi')
+
+ testImplementation testLibs.junit4
}
diff --git a/io/plugins/eu.esdihumboldt.hale.io.deegree/README.md b/io/plugins/eu.esdihumboldt.hale.io.deegree/README.md
new file mode 100644
index 0000000000..9b8b8b2514
--- /dev/null
+++ b/io/plugins/eu.esdihumboldt.hale.io.deegree/README.md
@@ -0,0 +1,4 @@
+eu.esdihumboldt.hale.io.deegree
+===============================
+
+Currently unsupported and migration to hale-core build requires more work to be completed (tests failing).
diff --git a/io/plugins/eu.esdihumboldt.hale.io.deegree/test/eu/esdihumboldt/hale/io/deegree/mapping/MappingWriterTest.groovy b/io/plugins/eu.esdihumboldt.hale.io.deegree/test/eu/esdihumboldt/hale/io/deegree/mapping/MappingWriterTest.groovy
index 10322e9957..1e770e7e38 100644
--- a/io/plugins/eu.esdihumboldt.hale.io.deegree/test/eu/esdihumboldt/hale/io/deegree/mapping/MappingWriterTest.groovy
+++ b/io/plugins/eu.esdihumboldt.hale.io.deegree/test/eu/esdihumboldt/hale/io/deegree/mapping/MappingWriterTest.groovy
@@ -1,14 +1,14 @@
/*
* Copyright (c) 2018 wetransform GmbH
- *
+ *
* All rights reserved. This program and the accompanying materials are made
* available under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of the License,
* or (at your option) any later version.
- *
+ *
* You should have received a copy of the GNU Lesser General Public License
* along with this distribution. If not, see .
- *
+ *
* Contributors:
* wetransform GmbH
*/
@@ -26,7 +26,7 @@ import org.junit.Test
/**
* Tests for MappingWriter class.
- *
+ *
* @author Simon Templer
*/
class MappingWriterTest {
diff --git a/io/plugins/eu.esdihumboldt.hale.io.geopackage/build.gradle b/io/plugins/eu.esdihumboldt.hale.io.geopackage/build.gradle
index e7a981a068..6d231438c0 100644
--- a/io/plugins/eu.esdihumboldt.hale.io.geopackage/build.gradle
+++ b/io/plugins/eu.esdihumboldt.hale.io.geopackage/build.gradle
@@ -38,4 +38,6 @@ dependencies {
testImplementation project(':cst:plugins:eu.esdihumboldt.cst.functions.geometric')
testImplementation project(':util:plugins:eu.esdihumboldt.util.test')
+
+ testRuntimeOnly project(':common:plugins:eu.esdihumboldt.hale.common.convert.core')
}
diff --git a/io/plugins/eu.esdihumboldt.hale.io.gml/build.gradle b/io/plugins/eu.esdihumboldt.hale.io.gml/build.gradle
index 7b56cbafca..d1c0a9430e 100644
--- a/io/plugins/eu.esdihumboldt.hale.io.gml/build.gradle
+++ b/io/plugins/eu.esdihumboldt.hale.io.gml/build.gradle
@@ -6,6 +6,16 @@ hale {
bundleName = 'GML/XML Instance I/O'
}
+tasks.test {
+ // workaround for system rules
+ /*
+ jvmArgs = [
+ '--add-opens',
+ 'java.base/java.util=ALL-UNNAMED'
+ ]
+ */
+}
+
dependencies {
implementation libs.slf4jplus.api
@@ -45,6 +55,7 @@ dependencies {
runtimeOnly project(':io:plugins:eu.esdihumboldt.hale.io.xml')
testImplementation testLibs.junit4
+ testImplementation testLibs.junit.system.rules
testRuntimeOnly libs.geotools.epsg
diff --git a/io/plugins/eu.esdihumboldt.hale.io.gml/test/eu/esdihumboldt/hale/io/gml/writer/internal/StreamGmlWriter2Test.groovy b/io/plugins/eu.esdihumboldt.hale.io.gml/test/eu/esdihumboldt/hale/io/gml/writer/internal/StreamGmlWriter2Test.groovy
index f8d6580a31..69a8749150 100644
--- a/io/plugins/eu.esdihumboldt.hale.io.gml/test/eu/esdihumboldt/hale/io/gml/writer/internal/StreamGmlWriter2Test.groovy
+++ b/io/plugins/eu.esdihumboldt.hale.io.gml/test/eu/esdihumboldt/hale/io/gml/writer/internal/StreamGmlWriter2Test.groovy
@@ -39,9 +39,12 @@ import eu.esdihumboldt.hale.io.xsd.reader.XmlSchemaReader
import eu.esdihumboldt.util.test.AbstractPlatformTest
import groovy.transform.CompileStatic
import java.util.function.Consumer
+import org.junit.Before
import org.junit.BeforeClass
import org.junit.Ignore
+import org.junit.Rule
import org.junit.Test
+import org.junit.contrib.java.lang.system.EnvironmentVariables
import org.locationtech.jts.geom.Geometry
import org.locationtech.jts.geom.LineString
import org.locationtech.jts.geom.MultiLineString
@@ -53,6 +56,9 @@ import org.locationtech.jts.geom.MultiLineString
*/
class StreamGmlWriter2Test extends AbstractPlatformTest {
+ // @Rule
+ // public final EnvironmentVariables environmentVariables = new EnvironmentVariables()
+
/**
* If temporary files shall be deleted
*/
@@ -66,6 +72,12 @@ class StreamGmlWriter2Test extends AbstractPlatformTest {
TestUtil.startConversionService();
}
+ // @Before
+ // void setEnv() {
+ // environmentVariables.set('HALE_REQUEST_MAX_CONNECTIONS', '200')
+ // environmentVariables.set('HALE_REQUEST_MAX_CONNECTIONS_PER_ROUTE', '50')
+ // }
+
/**
* Test if a codespace attribute is automatically added to a GML identifier within an INSPIRE type.
* @throws Exception
diff --git a/io/plugins/eu.esdihumboldt.hale.io.groovy/build.gradle b/io/plugins/eu.esdihumboldt.hale.io.groovy/build.gradle
index 949eb69e94..548ce79c7f 100644
--- a/io/plugins/eu.esdihumboldt.hale.io.groovy/build.gradle
+++ b/io/plugins/eu.esdihumboldt.hale.io.groovy/build.gradle
@@ -1,5 +1,5 @@
plugins {
- id 'hale.migrated-java'
+ id 'hale.migrated-groovy'
}
hale {
@@ -21,4 +21,6 @@ dependencies {
implementation project(':util:plugins:eu.esdihumboldt.util.groovy.sandbox')
testImplementation testLibs.junit4
+
+ testImplementation project(':util:plugins:eu.esdihumboldt.util.test')
}
diff --git a/io/plugins/eu.esdihumboldt.hale.io.groovy/test/eu/esdihumboldt/hale/io/groovy/snippets/GroovySnippetsTest.groovy b/io/plugins/eu.esdihumboldt.hale.io.groovy/test/eu/esdihumboldt/hale/io/groovy/snippets/GroovySnippetsTest.groovy
index f75c12eeeb..31cf6de3cc 100644
--- a/io/plugins/eu.esdihumboldt.hale.io.groovy/test/eu/esdihumboldt/hale/io/groovy/snippets/GroovySnippetsTest.groovy
+++ b/io/plugins/eu.esdihumboldt.hale.io.groovy/test/eu/esdihumboldt/hale/io/groovy/snippets/GroovySnippetsTest.groovy
@@ -1,36 +1,36 @@
/*
* Copyright (c) 2018 wetransform GmbH
- *
+ *
* All rights reserved. This program and the accompanying materials are made
* available under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of the License,
* or (at your option) any later version.
- *
+ *
* You should have received a copy of the GNU Lesser General Public License
* along with this distribution. If not, see .
- *
+ *
* Contributors:
* wetransform GmbH
*/
package eu.esdihumboldt.hale.io.groovy.snippets
-import org.junit.After
-import org.junit.Before
-import org.junit.Test
-
import eu.esdihumboldt.hale.common.core.service.ServiceProvider
import eu.esdihumboldt.hale.io.groovy.snippets.impl.SnippetServiceImpl
import eu.esdihumboldt.hale.io.groovy.snippets.impl.StringSnippet
import eu.esdihumboldt.util.groovy.sandbox.DefaultGroovyService
import eu.esdihumboldt.util.groovy.sandbox.GroovyService
+import eu.esdihumboldt.util.test.AbstractPlatformTest
+import org.junit.After
+import org.junit.Before
+import org.junit.Test
/**
* Tests for accessing snippets via GroovySnippets.
- *
+ *
* @author Simon Templer
*/
-class GroovySnippetsTest {
+class GroovySnippetsTest extends AbstractPlatformTest {
private ServiceProvider services
diff --git a/io/plugins/eu.esdihumboldt.hale.io.shp/build.gradle b/io/plugins/eu.esdihumboldt.hale.io.shp/build.gradle
index aae14f26a2..dd4c4efb59 100644
--- a/io/plugins/eu.esdihumboldt.hale.io.shp/build.gradle
+++ b/io/plugins/eu.esdihumboldt.hale.io.shp/build.gradle
@@ -34,6 +34,8 @@ dependencies {
testImplementation testLibs.junit4
testImplementation testLibs.assertj
+ testRuntimeOnly libs.geotools.epsg
+
testImplementation project(':common:plugins:eu.esdihumboldt.hale.common.schema.groovy')
testImplementation project(':common:plugins:eu.esdihumboldt.hale.common.test')
testImplementation project(':common:plugins:eu.esdihumboldt.hale.common.filter')
diff --git a/util/features/eu.esdihumboldt.util.feature.resource/build.gradle b/util/features/eu.esdihumboldt.util.feature.resource/build.gradle
index f4300d6ae3..37dc453c3e 100644
--- a/util/features/eu.esdihumboldt.util.feature.resource/build.gradle
+++ b/util/features/eu.esdihumboldt.util.feature.resource/build.gradle
@@ -5,14 +5,12 @@ plugins {
description = 'HALE resources feature'
dependencies {
- constraints {
- api(project(":util:plugins:eu.esdihumboldt.util.resource"))
+ api(project(":util:plugins:eu.esdihumboldt.util.resource"))
- api(project(":util:plugins:eu.esdihumboldt.util.resource.schemas.inspire.annex1"))
- api(project(":util:plugins:eu.esdihumboldt.util.resource.schemas.end"))
+ api(project(":util:plugins:eu.esdihumboldt.util.resource.schemas.inspire.annex1"))
+ api(project(":util:plugins:eu.esdihumboldt.util.resource.schemas.end"))
- // api(project(":util:plugins:eu.esdihumboldt.util.resource.schemas.citygml"))
+ // api(project(":util:plugins:eu.esdihumboldt.util.resource.schemas.citygml"))
- api(resJars.bundles.all)
- }
+ api(resJars.bundles.all)
}
diff --git a/util/plugins/eu.esdihumboldt.util.groovy.sandbox/build.gradle b/util/plugins/eu.esdihumboldt.util.groovy.sandbox/build.gradle
index cd2e457c0c..c6bc6c98e4 100644
--- a/util/plugins/eu.esdihumboldt.util.groovy.sandbox/build.gradle
+++ b/util/plugins/eu.esdihumboldt.util.groovy.sandbox/build.gradle
@@ -17,8 +17,6 @@ dependencies {
testImplementation testLibs.junit4
- /*
testImplementation project(':common:plugins:eu.esdihumboldt.hale.common.align')
testImplementation project(':cst:plugins:eu.esdihumboldt.cst.functions.groovy')
- */
}