Author: desruisseaux
Date: Wed Oct  1 14:59:09 2025
New Revision: 1928887

Log:
More tests.

Added:
   
sis/release-test/maven/with-epsg-embedded/src/test/java/org/apache/sis/test/referencing/
   
sis/release-test/maven/with-epsg-embedded/src/test/java/org/apache/sis/test/referencing/ConnectionTest.java
      - copied, changed from r1928886, 
sis/release-test/maven/with-epsg-embedded/src/test/java/org/apache/sis/test/ConnectionTest.java
   
sis/release-test/maven/with-epsg-embedded/src/test/java/org/apache/sis/test/referencing/ExamplesTest.java
      - copied, changed from r1928886, 
sis/release-test/maven/with-epsg-embedded/src/test/java/org/apache/sis/test/ExamplesTest.java
   sis/release-test/maven/with-epsg-modules/
   sis/release-test/maven/with-epsg-modules/pom.xml
   sis/release-test/maven/with-epsg-modules/src/
   sis/release-test/maven/with-epsg-modules/src/main/
   sis/release-test/maven/with-epsg-modules/src/main/java/
   sis/release-test/maven/with-epsg-modules/src/main/java/module-info.java
   sis/release-test/maven/with-epsg-modules/src/main/java/org/
   sis/release-test/maven/with-epsg-modules/src/main/java/org/apache/
   sis/release-test/maven/with-epsg-modules/src/main/java/org/apache/sis/
   sis/release-test/maven/with-epsg-modules/src/main/java/org/apache/sis/test/
   
sis/release-test/maven/with-epsg-modules/src/main/java/org/apache/sis/test/referencing/
   
sis/release-test/maven/with-epsg-modules/src/main/java/org/apache/sis/test/referencing/Application.java
   
sis/release-test/maven/with-epsg-modules/src/main/java/org/apache/sis/test/referencing/package-info.java
   sis/release-test/maven/with-epsg-modules/src/test/
   sis/release-test/maven/with-epsg-modules/src/test/java/
   sis/release-test/maven/with-epsg-modules/src/test/java/org/
   sis/release-test/maven/with-epsg-modules/src/test/java/org/apache/
   sis/release-test/maven/with-epsg-modules/src/test/java/org/apache/sis/
   sis/release-test/maven/with-epsg-modules/src/test/java/org/apache/sis/test/
   
sis/release-test/maven/with-epsg-modules/src/test/java/org/apache/sis/test/referencing/
   
sis/release-test/maven/with-epsg-modules/src/test/java/org/apache/sis/test/referencing/ConnectionTest.java
   
sis/release-test/maven/with-epsg/src/test/java/org/apache/sis/test/referencing/
   
sis/release-test/maven/with-epsg/src/test/java/org/apache/sis/test/referencing/SelfConsistencyTest.java
      - copied, changed from r1928886, 
sis/release-test/maven/with-epsg/src/test/java/org/apache/sis/test/SelfConsistencyTest.java
Deleted:
   
sis/release-test/maven/with-epsg-embedded/src/test/java/org/apache/sis/test/ConnectionTest.java
   
sis/release-test/maven/with-epsg-embedded/src/test/java/org/apache/sis/test/ExamplesTest.java
   
sis/release-test/maven/with-epsg/src/test/java/org/apache/sis/test/SelfConsistencyTest.java
Modified:
   sis/release-test/maven/pom.xml

Modified: sis/release-test/maven/pom.xml
==============================================================================
--- sis/release-test/maven/pom.xml      Wed Oct  1 12:45:02 2025        
(r1928886)
+++ sis/release-test/maven/pom.xml      Wed Oct  1 14:59:09 2025        
(r1928887)
@@ -46,6 +46,7 @@
 
   <properties>
     <sis.version>${project.version}</sis.version>
+    <derby.version>10.15.2.0</derby.version>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
     <maven.compiler.source>17</maven.compiler.source>
     <maven.compiler.target>17</maven.compiler.target>
@@ -66,7 +67,7 @@
     <repository>
       <id>sis.staging.main</id>
       <name>SIS staging repository of main artifacts</name>
-      
<url>https://repository.apache.org/content/repositories/orgapachesis-1060</url>
+      
<url>https://repository.apache.org/content/repositories/orgapachesis-1062</url>
     </repository>
     <repository>
       <id>unidata-all</id>
@@ -79,13 +80,13 @@
     <dependency>
       <groupId>org.apache.derby</groupId>
       <artifactId>derby</artifactId>
-      <version>10.15.2.0</version>
+      <version>${derby.version}</version>
       <scope>runtime</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.derby</groupId>
       <artifactId>derbytools</artifactId>
-      <version>10.15.2.0</version>
+      <version>${derby.version}</version>
       <scope>runtime</scope>
     </dependency>
     <dependency>
@@ -125,5 +126,6 @@
   <modules>
     <module>with-epsg</module>
     <module>with-epsg-embedded</module>
+    <module>with-epsg-modules</module>
   </modules>
 </project>

Copied and modified: 
sis/release-test/maven/with-epsg-embedded/src/test/java/org/apache/sis/test/referencing/ConnectionTest.java
 (from r1928886, 
sis/release-test/maven/with-epsg-embedded/src/test/java/org/apache/sis/test/ConnectionTest.java)
==============================================================================
--- 
sis/release-test/maven/with-epsg-embedded/src/test/java/org/apache/sis/test/ConnectionTest.java
     Wed Oct  1 12:45:02 2025        (r1928886, copy source)
+++ 
sis/release-test/maven/with-epsg-embedded/src/test/java/org/apache/sis/test/referencing/ConnectionTest.java
 Wed Oct  1 14:59:09 2025        (r1928887)
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sis.test;
+package org.apache.sis.test.referencing;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -43,7 +43,7 @@ public class ConnectionTest {
      */
     @Test
     public void verifyResource() throws IOException {
-        String file = 
"META-INF/SIS_DATA/Databases/spatial-metadata/service.properties";
+        String file = "SIS-DATA/Databases/SpatialMetadata/service.properties";
         try (InputStream stream = 
ClassLoader.getSystemClassLoader().getResourceAsStream(file)) {
             assertNotNull(stream, "File not found: " + file);
             assertEquals('#', stream.read());
@@ -58,7 +58,7 @@ public class ConnectionTest {
     @Test
     public void verifyConnection() throws SQLException {
         var ds = new EmbeddedDataSource();
-        ds.setDatabaseName("classpath:SIS_DATA/Databases/spatial-metadata");
+        ds.setDatabaseName("classpath:SIS-DATA/Databases/SpatialMetadata");
         try (Connection c = ds.getConnection()) {
             c.setSchema("EPSG");
         }

Copied and modified: 
sis/release-test/maven/with-epsg-embedded/src/test/java/org/apache/sis/test/referencing/ExamplesTest.java
 (from r1928886, 
sis/release-test/maven/with-epsg-embedded/src/test/java/org/apache/sis/test/ExamplesTest.java)
==============================================================================
--- 
sis/release-test/maven/with-epsg-embedded/src/test/java/org/apache/sis/test/ExamplesTest.java
       Wed Oct  1 12:45:02 2025        (r1928886, copy source)
+++ 
sis/release-test/maven/with-epsg-embedded/src/test/java/org/apache/sis/test/referencing/ExamplesTest.java
   Wed Oct  1 14:59:09 2025        (r1928887)
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sis.test;
+package org.apache.sis.test.referencing;
 
 import org.opengis.referencing.crs.CoordinateReferenceSystem;
 import org.opengis.util.FactoryException;

Added: sis/release-test/maven/with-epsg-modules/pom.xml
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ sis/release-test/maven/with-epsg-modules/pom.xml    Wed Oct  1 14:59:09 
2025        (r1928887)
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+
+<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>
+  <parent>
+    <groupId>org.apache.sis.test</groupId>
+    <artifactId>maven</artifactId>
+    <version>1.5</version>
+  </parent>
+
+  <groupId>org.apache.sis.test</groupId>
+  <artifactId>with-epsg-modules</artifactId>
+  <packaging>jar</packaging>
+
+  <name>Test SIS on the module-path</name>
+  <description>
+    A project using EPSG geodetic dataset as an embedded Derby database on the 
module-path.
+  </description>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.sis.core</groupId>
+      <artifactId>sis-referencing</artifactId>
+      <version>${sis.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.sis.non-free</groupId>
+      <artifactId>sis-embedded-data</artifactId>
+      <version>${sis.version}</version>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.derby</groupId>
+      <artifactId>derby</artifactId>
+      <version>${derby.version}</version>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.derby</groupId>
+      <artifactId>derbytools</artifactId>
+      <version>${derby.version}</version>
+      <scope>compile</scope>
+    </dependency>
+  </dependencies>
+</project>

Added: sis/release-test/maven/with-epsg-modules/src/main/java/module-info.java
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ sis/release-test/maven/with-epsg-modules/src/main/java/module-info.java     
Wed Oct  1 14:59:09 2025        (r1928887)
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Same as {@code with-epsg-embedded} but with dependencies declared as 
modules.
+ *
+ * @author  Martin Desruisseaux (Geomatys)
+ */
+module TestSISOnTheModulePath {
+  requires org.apache.sis.referencing;
+  requires org.apache.sis.referencing.database;
+  requires org.apache.derby.tools;
+}

Added: 
sis/release-test/maven/with-epsg-modules/src/main/java/org/apache/sis/test/referencing/Application.java
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ 
sis/release-test/maven/with-epsg-modules/src/main/java/org/apache/sis/test/referencing/Application.java
     Wed Oct  1 14:59:09 2025        (r1928887)
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.test.referencing;
+
+import java.io.InputStream;
+import java.sql.Connection;
+import org.apache.derby.jdbc.EmbeddedDataSource;
+import org.opengis.referencing.crs.CoordinateReferenceSystem;
+import org.apache.sis.referencing.CRS;
+import org.apache.sis.util.Utilities;
+
+
+/**
+ * Tests the connection to the embedded database.
+ */
+public class Application {
+    private Application() {
+    }
+
+    public static void main(String[] args) throws Exception {
+        String file = "SIS-DATA/Databases/SpatialMetadata/service.properties";
+        try (InputStream stream = 
ClassLoader.getSystemClassLoader().getResourceAsStream(file)) {
+            if (stream == null) {
+                throw new AssertionError("File not found: " + file);
+            }
+            if (stream.read() != '#') {
+                throw new AssertionError("File does not have the expected 
content.");
+            }
+        }
+        var ds = new EmbeddedDataSource();
+        ds.setDatabaseName("classpath:SIS-DATA/Databases/SpatialMetadata");
+        try (Connection c = ds.getConnection()) {
+            c.setSchema("EPSG");
+        }
+        CoordinateReferenceSystem crs = CRS.forCode("EPSG::6676");
+        CoordinateReferenceSystem roundTrip = CRS.fromWKT(crs.toWKT());
+        if (!Utilities.equalsIgnoreMetadata(crs, roundTrip)) {
+            throw new AssertionError("Inconsistent CRS.");
+        }
+    }
+}

Added: 
sis/release-test/maven/with-epsg-modules/src/main/java/org/apache/sis/test/referencing/package-info.java
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ 
sis/release-test/maven/with-epsg-modules/src/main/java/org/apache/sis/test/referencing/package-info.java
    Wed Oct  1 14:59:09 2025        (r1928887)
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Various operations for testing the Coordinate Reference Systems support.
+ *
+ * @author  Martin Desruisseaux (Geomatys)
+ */
+package org.apache.sis.test.referencing;

Added: 
sis/release-test/maven/with-epsg-modules/src/test/java/org/apache/sis/test/referencing/ConnectionTest.java
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ 
sis/release-test/maven/with-epsg-modules/src/test/java/org/apache/sis/test/referencing/ConnectionTest.java
  Wed Oct  1 14:59:09 2025        (r1928887)
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.test.referencing;
+
+import org.junit.jupiter.api.Test;
+
+
+/**
+ * Tests the connection to the embedded database.
+ */
+public class ConnectionTest {
+    @Test
+    public void testConnection() throws Exception {
+        Application.main(null);
+    }
+}

Copied and modified: 
sis/release-test/maven/with-epsg/src/test/java/org/apache/sis/test/referencing/SelfConsistencyTest.java
 (from r1928886, 
sis/release-test/maven/with-epsg/src/test/java/org/apache/sis/test/SelfConsistencyTest.java)
==============================================================================
--- 
sis/release-test/maven/with-epsg/src/test/java/org/apache/sis/test/SelfConsistencyTest.java
 Wed Oct  1 12:45:02 2025        (r1928886, copy source)
+++ 
sis/release-test/maven/with-epsg/src/test/java/org/apache/sis/test/referencing/SelfConsistencyTest.java
     Wed Oct  1 14:59:09 2025        (r1928887)
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sis.test;
+package org.apache.sis.test.referencing;
 
 import org.opengis.referencing.crs.CoordinateReferenceSystem;
 import org.opengis.util.FactoryException;

Reply via email to