This is an automated email from the ASF dual-hosted git repository. desruisseaux pushed a commit to branch geoapi-4.0 in repository https://gitbox.apache.org/repos/asf/sis.git
commit e5b4bba13c0a33574d9dea8b17219ca45fe43c16 Author: Martin Desruisseaux <[email protected]> AuthorDate: Tue May 9 14:39:21 2023 +0200 Add `module-info.java` files and migrate the declarations of service providers. Keep the old `META-INF/services/` declarations for compatibility with frameworks such as Maven 3.8.6 or Gradle 8.2.1 wich put the modularized dependencies on the class-path rather than the module-path. More info about this Maven/Gradle bug: https://issues.apache.org/jira/browse/MNG-7855 This initial version of `module-info.java` files opens some JAXB annotated classes not only to Jakarta API, but also to a specific implementation (namely Glassfish). We have not yet found a way to avoid that. --- application/sis-console/pom.xml | 5 - .../sis-console/src/main/java/module-info.java | 37 ++++ .../org.apache.sis.setup.InstallationResources | 5 +- application/sis-javafx/pom.xml | 5 - .../sis-javafx/src/main/java/module-info.java | 52 +++++ .../org.apache.sis.setup.InstallationResources | 5 +- .../sis-openoffice/src/main/java/module-info.java | 31 +++ .../sis-webapp/src/main/java/module-info.java | 27 +++ cloud/sis-cloud-aws/pom.xml | 22 --- cloud/sis-cloud-aws/src/main/java/module-info.java | 38 ++++ .../services/java.nio.file.spi.FileSystemProvider | 3 + core/pom.xml | 2 +- core/sis-cql/pom.xml | 14 -- core/sis-cql/src/main/java/module-info.java | 29 +++ core/sis-feature/pom.xml | 23 --- core/sis-feature/src/main/java/module-info.java | 80 ++++++++ core/sis-metadata/pom.xml | 23 --- core/sis-metadata/src/main/java/module-info.java | 190 ++++++++++++++++++ core/sis-metadata/src/main/javadoc/overview.html | 32 --- .../org.apache.sis.internal.jaxb.TypeRegistration | 3 + .../org.apache.sis.internal.util.MetadataServices | 3 + .../META-INF/services/org.opengis.util.NameFactory | 5 +- core/sis-portrayal/pom.xml | 23 --- core/sis-portrayal/src/main/java/module-info.java | 41 ++++ core/sis-referencing-by-identifiers/pom.xml | 23 --- .../src/main/java/module-info.java | 30 +++ core/sis-referencing/pom.xml | 23 --- .../sis-referencing/src/main/java/module-info.java | 218 +++++++++++++++++++++ .../sis-referencing/src/main/javadoc/overview.html | 32 --- ...org.apache.sis.internal.jaxb.AdapterReplacement | 5 +- .../org.apache.sis.internal.jaxb.TypeRegistration | 5 +- ...pache.sis.internal.metadata.ReferencingServices | 3 + ...rg.apache.sis.internal.metadata.sql.Initializer | 5 +- ...org.opengis.referencing.crs.CRSAuthorityFactory | 5 +- .../org.opengis.referencing.crs.CRSFactory | 5 +- .../org.opengis.referencing.cs.CSAuthorityFactory | 5 +- .../services/org.opengis.referencing.cs.CSFactory | 5 +- ...opengis.referencing.datum.DatumAuthorityFactory | 5 +- .../org.opengis.referencing.datum.DatumFactory | 5 +- ...g.operation.CoordinateOperationAuthorityFactory | 5 +- ...eferencing.operation.CoordinateOperationFactory | 5 +- ...ngis.referencing.operation.MathTransformFactory | 5 +- ...g.opengis.referencing.operation.OperationMethod | 8 +- core/sis-utility/pom.xml | 24 --- core/sis-utility/src/main/java/module-info.java | 165 ++++++++++++++++ core/sis-utility/src/main/javadoc/overview.html | 47 ----- .../services/javax.measure.spi.ServiceProvider | 5 +- .../services/org.apache.sis.util.ObjectConverter | 8 +- pom.xml | 2 +- profiles/sis-french-profile/pom.xml | 22 --- .../src/main/java/module-info.java | 36 ++++ .../org.apache.sis.internal.jaxb.TypeRegistration | 3 + profiles/sis-japan-profile/pom.xml | 22 --- .../src/main/java/module-info.java | 37 ++++ .../org.apache.sis.internal.netcdf.Convention | 3 + .../ucar.nc2.dataset.spi.CoordSystemBuilderFactory | 3 + storage/sis-earth-observation/pom.xml | 22 --- .../src/main/java/module-info.java | 35 ++++ .../org.apache.sis.storage.DataStoreProvider | 3 + storage/sis-geotiff/pom.xml | 22 --- storage/sis-geotiff/src/main/java/module-info.java | 39 ++++ .../org.apache.sis.storage.DataStoreProvider | 3 + storage/sis-netcdf/pom.xml | 22 --- storage/sis-netcdf/src/main/java/module-info.java | 40 ++++ .../org.apache.sis.storage.DataStoreProvider | 3 + storage/sis-shapefile/pom.xml | 15 -- .../sis-shapefile/src/main/java/module-info.java | 33 ++++ storage/sis-sqlstore/pom.xml | 15 -- .../sis-sqlstore/src/main/java/module-info.java | 33 ++++ storage/sis-storage/pom.xml | 22 --- storage/sis-storage/src/main/java/module-info.java | 80 ++++++++ .../services/java.nio.file.spi.FileTypeDetector | 3 + .../org.apache.sis.storage.DataStoreProvider | 3 + storage/sis-xmlstore/pom.xml | 15 -- .../sis-xmlstore/src/main/java/module-info.java | 44 +++++ .../org.apache.sis.storage.DataStoreProvider | 3 + 76 files changed, 1410 insertions(+), 517 deletions(-) diff --git a/application/sis-console/pom.xml b/application/sis-console/pom.xml index 9230aacb19..fc9059d3c7 100644 --- a/application/sis-console/pom.xml +++ b/application/sis-console/pom.xml @@ -75,11 +75,6 @@ <manifest> <mainClass>org.apache.sis.console.Command</mainClass> </manifest> - <manifestEntries> - <Automatic-Module-Name> - org.apache.sis.console - </Automatic-Module-Name> - </manifestEntries> </archive> </configuration> </plugin> diff --git a/application/sis-console/src/main/java/module-info.java b/application/sis-console/src/main/java/module-info.java new file mode 100644 index 0000000000..cb5f883c5d --- /dev/null +++ b/application/sis-console/src/main/java/module-info.java @@ -0,0 +1,37 @@ +/* + * 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. + */ + +/** + * Command line interface for Apache SIS. + * + * @author Martin Desruisseaux (Geomatys) + * @version 1.4 + * @since 0.3 + */ +module org.apache.sis.console { + requires java.sql; + requires java.rmi; + requires java.management; + requires jakarta.xml.bind; + requires org.apache.sis.storage; + requires org.apache.sis.storage.xml; + + provides org.apache.sis.setup.InstallationResources + with org.apache.sis.console.ResourcesDownloader; + + exports org.apache.sis.console; +} diff --git a/application/sis-console/src/main/resources/META-INF/services/org.apache.sis.setup.InstallationResources b/application/sis-console/src/main/resources/META-INF/services/org.apache.sis.setup.InstallationResources index 8eab3c9426..436e74c82a 100644 --- a/application/sis-console/src/main/resources/META-INF/services/org.apache.sis.setup.InstallationResources +++ b/application/sis-console/src/main/resources/META-INF/services/org.apache.sis.setup.InstallationResources @@ -1,3 +1,4 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements; -# and to You under the Apache License, Version 2.0. +# Workaround for Maven bug https://issues.apache.org/jira/browse/MNG-7855 +# The content of this file is automatically derived from module-info.class file. +# Should be used only if the JAR file was on class-path rather than module-path. org.apache.sis.console.ResourcesDownloader diff --git a/application/sis-javafx/pom.xml b/application/sis-javafx/pom.xml index e03cdcc31c..3d75210dee 100644 --- a/application/sis-javafx/pom.xml +++ b/application/sis-javafx/pom.xml @@ -111,11 +111,6 @@ <manifest> <mainClass>org.apache.sis.gui.DataViewer</mainClass> </manifest> - <manifestEntries> - <Automatic-Module-Name> - org.apache.sis.gui - </Automatic-Module-Name> - </manifestEntries> </archive> </configuration> </plugin> diff --git a/application/sis-javafx/src/main/java/module-info.java b/application/sis-javafx/src/main/java/module-info.java new file mode 100644 index 0000000000..f1a15fadd5 --- /dev/null +++ b/application/sis-javafx/src/main/java/module-info.java @@ -0,0 +1,52 @@ +/* + * 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. + */ + +/** + * JavaFX application for Apache SIS. + * + * @author Smaniotto Enzo (GSoC) + * @author Johann Sorel (Geomatys) + * @author Martin Desruisseaux (Geomatys) + * @version 1.4 + * @since 1.1 + */ +module org.apache.sis.gui { + // Dependencies visible in public API. + requires transitive java.desktop; + requires transitive javafx.controls; + requires transitive org.apache.sis.portrayal; + + // Dependencies for implementation only. + requires java.prefs; + requires java.logging; + requires java.sql; + requires java.xml; + requires jakarta.xml.bind; + requires javafx.web; + requires org.apache.sis.storage.xml; + requires org.apache.sis.referencing.gazetteer; + + provides org.apache.sis.setup.InstallationResources + with org.apache.sis.internal.gui.OptionalDataDownloader; + + exports org.apache.sis.gui; + exports org.apache.sis.gui.metadata; + exports org.apache.sis.gui.referencing; + exports org.apache.sis.gui.dataset; + exports org.apache.sis.gui.coverage; + exports org.apache.sis.gui.map; +} diff --git a/application/sis-javafx/src/main/resources/META-INF/services/org.apache.sis.setup.InstallationResources b/application/sis-javafx/src/main/resources/META-INF/services/org.apache.sis.setup.InstallationResources index 0cdb1b880b..b18639ffe9 100644 --- a/application/sis-javafx/src/main/resources/META-INF/services/org.apache.sis.setup.InstallationResources +++ b/application/sis-javafx/src/main/resources/META-INF/services/org.apache.sis.setup.InstallationResources @@ -1,3 +1,4 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements; -# and to You under the Apache License, Version 2.0. +# Workaround for Maven bug https://issues.apache.org/jira/browse/MNG-7855 +# The content of this file is automatically derived from module-info.class file. +# Should be used only if the JAR file was on class-path rather than module-path. org.apache.sis.internal.gui.OptionalDataDownloader diff --git a/application/sis-openoffice/src/main/java/module-info.java b/application/sis-openoffice/src/main/java/module-info.java new file mode 100644 index 0000000000..6364577884 --- /dev/null +++ b/application/sis-openoffice/src/main/java/module-info.java @@ -0,0 +1,31 @@ +/* + * 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. + */ + +/** + * Apache SIS services for OpenOffice. + * + * @author Martin Desruisseaux (Geomatys) + * @version 1.4 + * @since 0.3 + */ +module org.apache.sis.openoffice { + requires static org.libreoffice.uno; + requires org.apache.sis.referencing; + requires org.apache.sis.storage; + + exports org.apache.sis.openoffice; +} diff --git a/application/sis-webapp/src/main/java/module-info.java b/application/sis-webapp/src/main/java/module-info.java new file mode 100644 index 0000000000..43c4598011 --- /dev/null +++ b/application/sis-webapp/src/main/java/module-info.java @@ -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. + */ + +/** + * Place-holder for future web services. + */ +module org.apache.sis.webapp { + requires transitive org.apache.sis.storage; + requires static jakarta.servlet; + requires static osgi.core; + + exports org.apache.sis.services; +} diff --git a/cloud/sis-cloud-aws/pom.xml b/cloud/sis-cloud-aws/pom.xml index 0ec1620512..851dab6e65 100644 --- a/cloud/sis-cloud-aws/pom.xml +++ b/cloud/sis-cloud-aws/pom.xml @@ -61,28 +61,6 @@ </developers> - <!-- =========================================================== - Build configuration - =========================================================== --> - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-jar-plugin</artifactId> - <configuration> - <archive> - <manifestEntries> - <Automatic-Module-Name> - org.apache.sis.cloud.aws - </Automatic-Module-Name> - </manifestEntries> - </archive> - </configuration> - </plugin> - </plugins> - </build> - - <!-- =========================================================== Dependencies =========================================================== --> diff --git a/cloud/sis-cloud-aws/src/main/java/module-info.java b/cloud/sis-cloud-aws/src/main/java/module-info.java new file mode 100644 index 0000000000..5ab60c1c7a --- /dev/null +++ b/cloud/sis-cloud-aws/src/main/java/module-info.java @@ -0,0 +1,38 @@ +/* + * 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. + */ + +/** + * Java NIO wrappers for Amazon Simple Storage Service (S3). + * + * @author Martin Desruisseaux (Geomatys) + * @version 1.4 + * @since 1.2 + */ +module org.apache.sis.cloud.aws { + requires software.amazon.awssdk.core; + requires software.amazon.awssdk.auth; + requires software.amazon.awssdk.regions; + requires software.amazon.awssdk.services.s3; + requires software.amazon.awssdk.http; + requires transitive org.apache.sis.util; + requires org.apache.sis.storage; + + provides java.nio.file.spi.FileSystemProvider + with org.apache.sis.cloud.aws.s3.FileService; + + exports org.apache.sis.cloud.aws.s3; +} diff --git a/cloud/sis-cloud-aws/src/main/resources/META-INF/services/java.nio.file.spi.FileSystemProvider b/cloud/sis-cloud-aws/src/main/resources/META-INF/services/java.nio.file.spi.FileSystemProvider index 8aa0946af0..e852b151ee 100644 --- a/cloud/sis-cloud-aws/src/main/resources/META-INF/services/java.nio.file.spi.FileSystemProvider +++ b/cloud/sis-cloud-aws/src/main/resources/META-INF/services/java.nio.file.spi.FileSystemProvider @@ -1 +1,4 @@ +# Workaround for Maven bug https://issues.apache.org/jira/browse/MNG-7855 +# The content of this file is automatically derived from module-info.class file. +# Should be used only if the JAR file was on class-path rather than module-path. org.apache.sis.cloud.aws.s3.FileService diff --git a/core/pom.xml b/core/pom.xml index 6b9f8f3ad0..9498e75867 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -192,7 +192,7 @@ <module>sis-referencing</module> <module>sis-referencing-by-identifiers</module> <module>sis-feature</module> - <module>sis-cql</module> + <!--module>sis-cql</module--> <module>sis-portrayal</module> </modules> diff --git a/core/sis-cql/pom.xml b/core/sis-cql/pom.xml index 8aabe3a2d3..518f8905e2 100644 --- a/core/sis-cql/pom.xml +++ b/core/sis-cql/pom.xml @@ -65,20 +65,6 @@ =========================================================== --> <build> <plugins> - <!-- Anticipation for Java 9 --> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-jar-plugin</artifactId> - <configuration> - <archive> - <manifestEntries> - <Automatic-Module-Name> - org.apache.sis.cql - </Automatic-Module-Name> - </manifestEntries> - </archive> - </configuration> - </plugin> <plugin> <groupId>org.antlr</groupId> <artifactId>antlr4-maven-plugin</artifactId> diff --git a/core/sis-cql/src/main/java/module-info.java b/core/sis-cql/src/main/java/module-info.java new file mode 100644 index 0000000000..97d51b54e5 --- /dev/null +++ b/core/sis-cql/src/main/java/module-info.java @@ -0,0 +1,29 @@ +/* + * 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. + */ + +/** + * CQL parser. + * + * @author Johann Sorel (Geomatys) + * @version 1.4 + * @since 1.1 + */ +module org.apache.sis.cql { + requires transitive org.apache.sis.feature; + requires org.locationtech.jts; + requires org.antlr.antlr4.runtime; +} diff --git a/core/sis-feature/pom.xml b/core/sis-feature/pom.xml index 1123514a07..9bf20146c7 100644 --- a/core/sis-feature/pom.xml +++ b/core/sis-feature/pom.xml @@ -110,29 +110,6 @@ </contributors> - <!-- =========================================================== - Build configuration - =========================================================== --> - <build> - <plugins> - <!-- Anticipation for Java 9 --> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-jar-plugin</artifactId> - <configuration> - <archive> - <manifestEntries> - <Automatic-Module-Name> - org.apache.sis.feature - </Automatic-Module-Name> - </manifestEntries> - </archive> - </configuration> - </plugin> - </plugins> - </build> - - <!-- =========================================================== Dependencies =========================================================== --> diff --git a/core/sis-feature/src/main/java/module-info.java b/core/sis-feature/src/main/java/module-info.java new file mode 100644 index 0000000000..375709f958 --- /dev/null +++ b/core/sis-feature/src/main/java/module-info.java @@ -0,0 +1,80 @@ +/* + * 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. + */ + +/** + * Raster imagery and geometry features. + * + * @author Johann Sorel (Geomatys) + * @author Martin Desruisseaux (Geomatys) + * @version 1.4 + * @since 0.5 + */ +module org.apache.sis.feature { + requires java.sql; + requires transitive org.apache.sis.referencing; + + // Optional dependencies to be provided by user. + requires static esri.geometry.api; + requires static org.locationtech.jts; + + uses org.apache.sis.internal.filter.FunctionRegister; + + exports org.apache.sis.image; + exports org.apache.sis.coverage; + exports org.apache.sis.coverage.grid; + exports org.apache.sis.feature; + exports org.apache.sis.feature.builder; + exports org.apache.sis.filter; + exports org.apache.sis.index.tree; + + exports org.apache.sis.internal.filter to + org.apache.sis.storage, + org.apache.sis.storage.sql, + org.apache.sis.cql, // In the "incubator" sub-project. + org.apache.sis.portrayal; + + exports org.apache.sis.internal.feature to + org.apache.sis.storage, + org.apache.sis.storage.xml, + org.apache.sis.storage.sql, + org.apache.sis.storage.netcdf, + org.apache.sis.cql, // In the "incubator" sub-project. + org.apache.sis.portrayal, + org.apache.sis.gui; // In the "optional" sub-project. + + exports org.apache.sis.internal.feature.j2d to + org.apache.sis.gui; // In the "optional" sub-project. + + exports org.apache.sis.internal.feature.jts to + org.apache.sis.cql; // In the "incubator" sub-project. + + exports org.apache.sis.internal.coverage to + org.apache.sis.storage, + org.apache.sis.storage.netcdf, + org.apache.sis.portrayal; + + exports org.apache.sis.internal.coverage.j2d to + org.apache.sis.storage, + org.apache.sis.storage.sql, + org.apache.sis.storage.netcdf, + org.apache.sis.storage.geotiff, + org.apache.sis.portrayal, + org.apache.sis.gui; // In the "optional" sub-project. + + exports org.apache.sis.internal.processing.isoline to + org.apache.sis.gui; // In the "optional" sub-project. +} diff --git a/core/sis-metadata/pom.xml b/core/sis-metadata/pom.xml index 808a4c60bb..5fba100be8 100644 --- a/core/sis-metadata/pom.xml +++ b/core/sis-metadata/pom.xml @@ -109,29 +109,6 @@ </contributors> - <!-- =========================================================== - Build configuration - =========================================================== --> - <build> - <plugins> - <!-- Anticipation for Java 9 --> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-jar-plugin</artifactId> - <configuration> - <archive> - <manifestEntries> - <Automatic-Module-Name> - org.apache.sis.metadata - </Automatic-Module-Name> - </manifestEntries> - </archive> - </configuration> - </plugin> - </plugins> - </build> - - <!-- =========================================================== Dependencies =========================================================== --> diff --git a/core/sis-metadata/src/main/java/module-info.java b/core/sis-metadata/src/main/java/module-info.java new file mode 100644 index 0000000000..0210a2bf66 --- /dev/null +++ b/core/sis-metadata/src/main/java/module-info.java @@ -0,0 +1,190 @@ +/* + * 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. + */ + +/** + * Implementations of metadata derived from ISO 19115. + * This module provides both an implementation of the metadata interfaces defined in GeoAPI, + * and a framework for handling those metadata through Java reflection. + * + * @author Martin Desruisseaux (Geomatys) + * @author Cédric Briançon (Geomatys) + * @author Cullen Rombach (Image Matters) + * @version 1.4 + * @since 0.3 + */ +module org.apache.sis.metadata { + /* + * Dependencies. Only the ones that appear in public API should be transitive. + */ + requires java.sql; + requires java.naming; + requires transitive jakarta.xml.bind; + requires transitive org.apache.sis.util; + + /* + * Services needed or implemented by this module. + */ + provides org.opengis.util.NameFactory + with org.apache.sis.util.iso.DefaultNameFactory; + + provides org.apache.sis.internal.jaxb.TypeRegistration + with org.apache.sis.internal.metadata.MetadataTypes; + + provides org.apache.sis.internal.util.MetadataServices + with org.apache.sis.internal.metadata.ServicesForUtility; + + uses org.apache.sis.internal.metadata.ReferencingServices; + uses org.apache.sis.internal.metadata.sql.Initializer; + uses org.apache.sis.internal.jaxb.AdapterReplacement; + uses org.apache.sis.internal.jaxb.TypeRegistration; + uses org.opengis.temporal.TemporalFactory; + + /* + * Public API open to everyone. + */ + exports org.apache.sis.metadata; + exports org.apache.sis.metadata.iso; + exports org.apache.sis.metadata.iso.acquisition; + exports org.apache.sis.metadata.iso.citation; + exports org.apache.sis.metadata.iso.constraint; + exports org.apache.sis.metadata.iso.content; + exports org.apache.sis.metadata.iso.distribution; + exports org.apache.sis.metadata.iso.extent; + exports org.apache.sis.metadata.iso.identification; + exports org.apache.sis.metadata.iso.lineage; + exports org.apache.sis.metadata.iso.maintenance; + exports org.apache.sis.metadata.iso.quality; + exports org.apache.sis.metadata.iso.spatial; + exports org.apache.sis.metadata.sql; + exports org.apache.sis.util.iso; + exports org.apache.sis.xml; + + /* + * Internal API open only to other Apache SIS modules. + */ + exports org.apache.sis.internal.metadata to + org.apache.sis.referencing, + org.apache.sis.feature, + org.apache.sis.storage, + org.apache.sis.storage.netcdf, + org.apache.sis.storage.geotiff; + + exports org.apache.sis.internal.jaxb to + org.apache.sis.referencing, + org.apache.sis.storage.xml, + org.apache.sis.portrayal, + org.apache.sis.profile.france; + + exports org.apache.sis.internal.jaxb.gco to + org.apache.sis.referencing, + org.apache.sis.portrayal; + + exports org.apache.sis.internal.jaxb.gcx to + org.glassfish.jaxb.runtime, // TODO: need to export to Jakarta only. + org.glassfish.jaxb.core, // TODO: need to export to Jakarta only. + jakarta.xml.bind; // Seems ignored. + + exports org.apache.sis.internal.jaxb.lan to + org.glassfish.jaxb.runtime, // TODO: need to export to Jakarta only. + org.glassfish.jaxb.core, // TODO: need to export to Jakarta only. + jakarta.xml.bind; // Seems ignored. + + exports org.apache.sis.internal.jaxb.cat to + org.glassfish.jaxb.runtime, // TODO: need to export to Jakarta only. + org.glassfish.jaxb.core, // TODO: need to export to Jakarta only. + jakarta.xml.bind; // Seems ignored. + + exports org.apache.sis.internal.jaxb.gml to + org.apache.sis.referencing, + org.apache.sis.storage.xml, + org.glassfish.jaxb.runtime, // TODO: need to export to Jakarta only. + org.glassfish.jaxb.core, // TODO: need to export to Jakarta only. + jakarta.xml.bind; // Seems ignored. + + exports org.apache.sis.internal.jaxb.gmi to + org.glassfish.jaxb.core, // TODO: need to export to Jakarta only. + jakarta.xml.bind; // Seems ignored. + + exports org.apache.sis.internal.jaxb.gts to + org.glassfish.jaxb.core, // TODO: need to export to Jakarta only. + jakarta.xml.bind; // Seems ignored. + + exports org.apache.sis.internal.jaxb.code to + org.glassfish.jaxb.runtime, // TODO: need to export to Jakarta only. + org.glassfish.jaxb.core, // TODO: need to export to Jakarta only. + jakarta.xml.bind; // Seems ignored. + + exports org.apache.sis.internal.jaxb.metadata to + org.apache.sis.referencing, + org.apache.sis.storage, + org.apache.sis.profile.france, + org.glassfish.jaxb.runtime, // TODO: need to export to Jakarta only. + org.glassfish.jaxb.core, // TODO: need to export to Jakarta only. + jakarta.xml.bind; // Seems ignored. + + exports org.apache.sis.internal.jaxb.geometry to + org.glassfish.jaxb.core, // TODO: need to export to Jakarta only. + jakarta.xml.bind; // Seems ignored. + + exports org.apache.sis.internal.jaxb.metadata.replace to + org.apache.sis.referencing, + org.apache.sis.profile.france, + org.glassfish.jaxb.runtime, // For access to beforeUnmarshal(…). + org.glassfish.jaxb.core, // For access to various classes. + jakarta.xml.bind; // Seems ignored. + + exports org.apache.sis.internal.metadata.sql to + org.apache.sis.referencing, + org.apache.sis.storage.sql; + + exports org.apache.sis.internal.simple to + org.apache.sis.referencing, + org.apache.sis.feature, + org.apache.sis.storage, + org.apache.sis.storage.xml; + + exports org.apache.sis.internal.xml to + org.apache.sis.referencing, + org.apache.sis.storage, + org.apache.sis.storage.xml, + org.apache.sis.gui; // In the "optional" sub-project. + + /* + * Allow JAXB to use reflection for marshalling and + * unmarshalling Apache SIS objects in XML documents. + * + * Module names of some implementations: + * - com.sun.xml.bind + * - org.glassfish.jaxb.runtime + * + * Opening to implementation is a temporary hack, until + * we find why opening to Jakarta only is not sufficient. + */ + opens org.apache.sis.util.iso to jakarta.xml.bind, org.glassfish.jaxb.core, org.glassfish.jaxb.runtime; + opens org.apache.sis.metadata.iso to jakarta.xml.bind; + opens org.apache.sis.metadata.iso.citation to jakarta.xml.bind, org.glassfish.jaxb.runtime; + opens org.apache.sis.metadata.iso.constraint to jakarta.xml.bind, org.glassfish.jaxb.runtime; + opens org.apache.sis.metadata.iso.identification to jakarta.xml.bind, org.glassfish.jaxb.runtime; + opens org.apache.sis.metadata.iso.quality to jakarta.xml.bind, org.glassfish.jaxb.runtime; + opens org.apache.sis.metadata.iso.lineage to jakarta.xml.bind, org.glassfish.jaxb.runtime; + opens org.apache.sis.metadata.iso.content to jakarta.xml.bind, org.glassfish.jaxb.runtime; + opens org.apache.sis.metadata.iso.distribution to jakarta.xml.bind, org.glassfish.jaxb.runtime; + opens org.apache.sis.metadata.iso.maintenance to jakarta.xml.bind, org.glassfish.jaxb.runtime; + + opens org.apache.sis.internal.jaxb.gco to jakarta.xml.bind; + opens org.apache.sis.internal.jaxb.gml to jakarta.xml.bind; +} diff --git a/core/sis-metadata/src/main/javadoc/overview.html b/core/sis-metadata/src/main/javadoc/overview.html deleted file mode 100644 index c90cb17505..0000000000 --- a/core/sis-metadata/src/main/javadoc/overview.html +++ /dev/null @@ -1,32 +0,0 @@ -<!DOCTYPE html> - -<!-- - 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. ---> - -<html> - <head> - <title>API Overview</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> - </head> - <body> - Overview of Apache <code>sis-metadata</code> module. - This Javadoc is only about one specific module. For the full Apache SIS project, - see the <a href="http://sis.apache.org/apidocs/overview-summary.html">aggregated Javadoc</a>. - </body> -</html> diff --git a/core/sis-metadata/src/main/resources/META-INF/services/org.apache.sis.internal.jaxb.TypeRegistration b/core/sis-metadata/src/main/resources/META-INF/services/org.apache.sis.internal.jaxb.TypeRegistration index 388c17fe7a..7d926b0ed2 100644 --- a/core/sis-metadata/src/main/resources/META-INF/services/org.apache.sis.internal.jaxb.TypeRegistration +++ b/core/sis-metadata/src/main/resources/META-INF/services/org.apache.sis.internal.jaxb.TypeRegistration @@ -1 +1,4 @@ +# Workaround for Maven bug https://issues.apache.org/jira/browse/MNG-7855 +# The content of this file is automatically derived from module-info.class file. +# Should be used only if the JAR file was on class-path rather than module-path. org.apache.sis.internal.metadata.MetadataTypes diff --git a/core/sis-metadata/src/main/resources/META-INF/services/org.apache.sis.internal.util.MetadataServices b/core/sis-metadata/src/main/resources/META-INF/services/org.apache.sis.internal.util.MetadataServices index ebf1b0244f..488a5e11ba 100644 --- a/core/sis-metadata/src/main/resources/META-INF/services/org.apache.sis.internal.util.MetadataServices +++ b/core/sis-metadata/src/main/resources/META-INF/services/org.apache.sis.internal.util.MetadataServices @@ -1 +1,4 @@ +# Workaround for Maven bug https://issues.apache.org/jira/browse/MNG-7855 +# The content of this file is automatically derived from module-info.class file. +# Should be used only if the JAR file was on class-path rather than module-path. org.apache.sis.internal.metadata.ServicesForUtility diff --git a/core/sis-metadata/src/main/resources/META-INF/services/org.opengis.util.NameFactory b/core/sis-metadata/src/main/resources/META-INF/services/org.opengis.util.NameFactory index 7443842b4c..d29451507d 100644 --- a/core/sis-metadata/src/main/resources/META-INF/services/org.opengis.util.NameFactory +++ b/core/sis-metadata/src/main/resources/META-INF/services/org.opengis.util.NameFactory @@ -1,3 +1,4 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements; -# and to You under the Apache License, Version 2.0. +# Workaround for Maven bug https://issues.apache.org/jira/browse/MNG-7855 +# The content of this file is automatically derived from module-info.class file. +# Should be used only if the JAR file was on class-path rather than module-path. org.apache.sis.util.iso.DefaultNameFactory diff --git a/core/sis-portrayal/pom.xml b/core/sis-portrayal/pom.xml index 4d07f5a983..4c54d947f1 100644 --- a/core/sis-portrayal/pom.xml +++ b/core/sis-portrayal/pom.xml @@ -71,29 +71,6 @@ </developers> - <!-- =========================================================== - Build configuration - =========================================================== --> - <build> - <plugins> - <!-- Anticipation for Java 9 --> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-jar-plugin</artifactId> - <configuration> - <archive> - <manifestEntries> - <Automatic-Module-Name> - org.apache.sis.portrayal - </Automatic-Module-Name> - </manifestEntries> - </archive> - </configuration> - </plugin> - </plugins> - </build> - - <!-- =========================================================== Dependencies =========================================================== --> diff --git a/core/sis-portrayal/src/main/java/module-info.java b/core/sis-portrayal/src/main/java/module-info.java new file mode 100644 index 0000000000..c9bc02e670 --- /dev/null +++ b/core/sis-portrayal/src/main/java/module-info.java @@ -0,0 +1,41 @@ +/* + * 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. + */ + +/** + * Raster imagery and geometry features. + * + * @author Johann Sorel (Geomatys) + * @author Martin Desruisseaux (Geomatys) + * @version 1.4 + * @since 1.2 + */ +module org.apache.sis.portrayal { + requires transitive org.apache.sis.storage; + requires jakarta.xml.bind; + requires static org.locationtech.jts; + + exports org.apache.sis.portrayal; + + exports org.apache.sis.internal.map.coverage to + org.apache.sis.gui; // In the "optional" sub-project. + + /* + * Allow JAXB to use reflection for marshalling and + * unmarshalling Apache SIS objects in XML documents. + */ + opens org.apache.sis.style.se1 to jakarta.xml.bind; +} diff --git a/core/sis-referencing-by-identifiers/pom.xml b/core/sis-referencing-by-identifiers/pom.xml index 8736880187..8b7819b4f8 100644 --- a/core/sis-referencing-by-identifiers/pom.xml +++ b/core/sis-referencing-by-identifiers/pom.xml @@ -70,29 +70,6 @@ </developers> - <!-- =========================================================== - Build configuration - =========================================================== --> - <build> - <plugins> - <!-- Anticipation for Java 9 --> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-jar-plugin</artifactId> - <configuration> - <archive> - <manifestEntries> - <Automatic-Module-Name> - org.apache.sis.referencing.gazetteer - </Automatic-Module-Name> - </manifestEntries> - </archive> - </configuration> - </plugin> - </plugins> - </build> - - <!-- =========================================================== Dependencies =========================================================== --> diff --git a/core/sis-referencing-by-identifiers/src/main/java/module-info.java b/core/sis-referencing-by-identifiers/src/main/java/module-info.java new file mode 100644 index 0000000000..4a99eb5bf0 --- /dev/null +++ b/core/sis-referencing-by-identifiers/src/main/java/module-info.java @@ -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. + */ + +/** + * Referencing by identifiers. + * + * @author Martin Desruisseaux (Geomatys) + * @version 1.4 + * @since 0.8 + */ +module org.apache.sis.referencing.gazetteer { + requires jakarta.xml.bind; + requires transitive org.apache.sis.referencing; + + exports org.apache.sis.referencing.gazetteer; +} diff --git a/core/sis-referencing/pom.xml b/core/sis-referencing/pom.xml index 4a4bdbe904..ab88a10bd8 100644 --- a/core/sis-referencing/pom.xml +++ b/core/sis-referencing/pom.xml @@ -92,29 +92,6 @@ </contributors> - <!-- =========================================================== - Build configuration - =========================================================== --> - <build> - <plugins> - <!-- Anticipation for Java 9 --> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-jar-plugin</artifactId> - <configuration> - <archive> - <manifestEntries> - <Automatic-Module-Name> - org.apache.sis.referencing - </Automatic-Module-Name> - </manifestEntries> - </archive> - </configuration> - </plugin> - </plugins> - </build> - - <!-- =========================================================== Dependencies =========================================================== --> diff --git a/core/sis-referencing/src/main/java/module-info.java b/core/sis-referencing/src/main/java/module-info.java new file mode 100644 index 0000000000..94125d9666 --- /dev/null +++ b/core/sis-referencing/src/main/java/module-info.java @@ -0,0 +1,218 @@ +/* + * 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. + */ + +/** + * Referencing by coordinates. + * + * @author Martin Desruisseaux (Geomatys) + * @author Rémi Maréchal (Geomatys) + * @author Maxime Gavens (Geomatys) + * @version 1.4 + * @since 0.3 + */ +module org.apache.sis.referencing { + requires java.sql; + requires jakarta.xml.bind; + requires transitive java.desktop; + requires transitive org.apache.sis.metadata; + + provides org.apache.sis.internal.metadata.sql.Initializer + with org.apache.sis.internal.referencing.DatabaseListener; + + provides org.opengis.referencing.crs.CRSFactory + with org.apache.sis.referencing.factory.GeodeticObjectFactory; + + provides org.opengis.referencing.cs.CSFactory + with org.apache.sis.referencing.factory.GeodeticObjectFactory; + + provides org.opengis.referencing.datum.DatumFactory + with org.apache.sis.referencing.factory.GeodeticObjectFactory; + + provides org.opengis.referencing.operation.CoordinateOperationFactory + with org.apache.sis.referencing.operation.DefaultCoordinateOperationFactory; + + provides org.opengis.referencing.operation.MathTransformFactory + with org.apache.sis.referencing.operation.transform.DefaultMathTransformFactory; + + uses org.opengis.referencing.crs.CRSAuthorityFactory; + provides org.opengis.referencing.crs.CRSAuthorityFactory + with org.apache.sis.internal.referencing.EPSGFactoryProxyCRS, + org.apache.sis.referencing.factory.CommonAuthorityFactory; + + uses org.opengis.referencing.cs.CSAuthorityFactory; + provides org.opengis.referencing.cs.CSAuthorityFactory + with org.apache.sis.internal.referencing.EPSGFactoryProxyCS; + + uses org.opengis.referencing.datum.DatumAuthorityFactory; + provides org.opengis.referencing.datum.DatumAuthorityFactory + with org.apache.sis.internal.referencing.EPSGFactoryProxyDatum; + + uses org.opengis.referencing.operation.CoordinateOperationAuthorityFactory; + provides org.opengis.referencing.operation.CoordinateOperationAuthorityFactory + with org.apache.sis.internal.referencing.EPSGFactoryProxyCOP; + + // Heavier classes (e.g. having more dependencies) or classes less likely to be used should be last. + uses org.opengis.referencing.operation.OperationMethod; + provides org.opengis.referencing.operation.OperationMethod + with org.apache.sis.internal.referencing.provider.Affine, + org.apache.sis.internal.referencing.provider.AxisOrderReversal, + org.apache.sis.internal.referencing.provider.AxisOrderReversal3D, + org.apache.sis.internal.referencing.provider.Geographic3Dto2D, + org.apache.sis.internal.referencing.provider.Geographic2Dto3D, + org.apache.sis.internal.referencing.provider.GeographicOffsets, + org.apache.sis.internal.referencing.provider.GeographicOffsets2D, + org.apache.sis.internal.referencing.provider.GeographicAndVerticalOffsets, + org.apache.sis.internal.referencing.provider.VerticalOffset, + org.apache.sis.internal.referencing.provider.LongitudeRotation, + org.apache.sis.internal.referencing.provider.GeocentricTranslation, + org.apache.sis.internal.referencing.provider.PositionVector7Param, + org.apache.sis.internal.referencing.provider.CoordinateFrameRotation, + org.apache.sis.internal.referencing.provider.GeographicToGeocentric, + org.apache.sis.internal.referencing.provider.GeocentricToGeographic, + org.apache.sis.internal.referencing.provider.GeocentricTranslation3D, + org.apache.sis.internal.referencing.provider.GeocentricTranslation2D, + org.apache.sis.internal.referencing.provider.PositionVector7Param3D, + org.apache.sis.internal.referencing.provider.PositionVector7Param2D, + org.apache.sis.internal.referencing.provider.CoordinateFrameRotation3D, + org.apache.sis.internal.referencing.provider.CoordinateFrameRotation2D, + org.apache.sis.internal.referencing.provider.Molodensky, + org.apache.sis.internal.referencing.provider.AbridgedMolodensky, + org.apache.sis.internal.referencing.provider.PseudoPlateCarree, + org.apache.sis.internal.referencing.provider.Equirectangular, + org.apache.sis.internal.referencing.provider.Mercator1SP, + org.apache.sis.internal.referencing.provider.Mercator2SP, + org.apache.sis.internal.referencing.provider.MercatorSpherical, + org.apache.sis.internal.referencing.provider.PseudoMercator, + org.apache.sis.internal.referencing.provider.MercatorAuxiliarySphere, + org.apache.sis.internal.referencing.provider.RegionalMercator, + org.apache.sis.internal.referencing.provider.MillerCylindrical, + org.apache.sis.internal.referencing.provider.LambertConformal1SP, + org.apache.sis.internal.referencing.provider.LambertConformal2SP, + org.apache.sis.internal.referencing.provider.LambertConformalWest, + org.apache.sis.internal.referencing.provider.LambertConformalBelgium, + org.apache.sis.internal.referencing.provider.LambertConformalMichigan, + org.apache.sis.internal.referencing.provider.LambertCylindricalEqualArea, + org.apache.sis.internal.referencing.provider.LambertCylindricalEqualAreaSpherical, + org.apache.sis.internal.referencing.provider.LambertAzimuthalEqualArea, + org.apache.sis.internal.referencing.provider.LambertAzimuthalEqualAreaSpherical, + org.apache.sis.internal.referencing.provider.AlbersEqualArea, + org.apache.sis.internal.referencing.provider.TransverseMercator, + org.apache.sis.internal.referencing.provider.TransverseMercatorSouth, + org.apache.sis.internal.referencing.provider.CassiniSoldner, + org.apache.sis.internal.referencing.provider.HyperbolicCassiniSoldner, + org.apache.sis.internal.referencing.provider.PolarStereographicA, + org.apache.sis.internal.referencing.provider.PolarStereographicB, + org.apache.sis.internal.referencing.provider.PolarStereographicC, + org.apache.sis.internal.referencing.provider.PolarStereographicNorth, + org.apache.sis.internal.referencing.provider.PolarStereographicSouth, + org.apache.sis.internal.referencing.provider.ObliqueStereographic, + org.apache.sis.internal.referencing.provider.ObliqueMercator, + org.apache.sis.internal.referencing.provider.ObliqueMercatorCenter, + org.apache.sis.internal.referencing.provider.ObliqueMercatorTwoPoints, + org.apache.sis.internal.referencing.provider.ObliqueMercatorTwoPointsCenter, + org.apache.sis.internal.referencing.provider.Orthographic, + org.apache.sis.internal.referencing.provider.ModifiedAzimuthalEquidistant, + org.apache.sis.internal.referencing.provider.AzimuthalEquidistantSpherical, + org.apache.sis.internal.referencing.provider.ZonedTransverseMercator, + org.apache.sis.internal.referencing.provider.Sinusoidal, + org.apache.sis.internal.referencing.provider.PseudoSinusoidal, + org.apache.sis.internal.referencing.provider.Polyconic, + org.apache.sis.internal.referencing.provider.Mollweide, + org.apache.sis.internal.referencing.provider.SouthPoleRotation, + org.apache.sis.internal.referencing.provider.NorthPoleRotation, + org.apache.sis.internal.referencing.provider.NTv2, + org.apache.sis.internal.referencing.provider.NTv1, + org.apache.sis.internal.referencing.provider.NADCON, + org.apache.sis.internal.referencing.provider.FranceGeocentricInterpolation, + org.apache.sis.internal.referencing.provider.Interpolation1D, + org.apache.sis.internal.referencing.provider.SatelliteTracking, + org.apache.sis.internal.referencing.provider.Wraparound, + org.apache.sis.internal.referencing.provider.GeocentricToTopocentric, + org.apache.sis.internal.referencing.provider.GeographicToTopocentric; + + provides org.apache.sis.internal.jaxb.TypeRegistration + with org.apache.sis.internal.referencing.ReferencingTypes; + + provides org.apache.sis.internal.jaxb.AdapterReplacement + with org.apache.sis.internal.jaxb.referencing.SC_VerticalCRS; + + provides org.apache.sis.internal.metadata.ReferencingServices + with org.apache.sis.internal.referencing.ServicesForMetadata; + + exports org.apache.sis.geometry; + exports org.apache.sis.io.wkt; + exports org.apache.sis.parameter; + exports org.apache.sis.referencing; + exports org.apache.sis.referencing.crs; + exports org.apache.sis.referencing.cs; + exports org.apache.sis.referencing.datum; + exports org.apache.sis.referencing.factory; + exports org.apache.sis.referencing.factory.sql; + exports org.apache.sis.referencing.operation; + exports org.apache.sis.referencing.operation.builder; + exports org.apache.sis.referencing.operation.matrix; + exports org.apache.sis.referencing.operation.projection; + exports org.apache.sis.referencing.operation.transform; + + exports org.apache.sis.internal.referencing to + org.apache.sis.referencing.gazetteer, + org.apache.sis.feature, + org.apache.sis.storage, + org.apache.sis.storage.sql, + org.apache.sis.storage.netcdf, + org.apache.sis.storage.geotiff, + org.apache.sis.storage.earthobservation, + org.apache.sis.portrayal, + org.apache.sis.console, + org.apache.sis.openoffice, + org.apache.sis.gui; // In the "optional" sub-project. + + exports org.apache.sis.internal.referencing.j2d to + org.apache.sis.referencing.gazetteer, + org.apache.sis.feature, + org.apache.sis.storage, + org.apache.sis.storage.sql, + org.apache.sis.storage.netcdf, + org.apache.sis.portrayal, + org.apache.sis.gui; // In the "optional" sub-project. + + exports org.apache.sis.internal.referencing.provider to + org.apache.sis.referencing.gazetteer, + org.apache.sis.storage.geotiff, + org.apache.sis.storage.netcdf, + org.apache.sis.storage.earthobservation, + org.apache.sis.profile.japan; + + exports org.apache.sis.internal.jaxb.referencing to + org.glassfish.jaxb.runtime, // For access to beforeUnmarshal(…). + org.glassfish.jaxb.core, // For access to various classes. + jakarta.xml.bind; // Seems ignored. + + /* + * Allow JAXB to use reflection for marshalling and + * unmarshalling Apache SIS objects in XML documents. + * + * Opening to implementation is a temporary hack, until + * we find why opening to Jakarta only is not sufficient. + */ + opens org.apache.sis.parameter to jakarta.xml.bind; + opens org.apache.sis.referencing to jakarta.xml.bind, org.glassfish.jaxb.core; + opens org.apache.sis.referencing.cs to jakarta.xml.bind, org.glassfish.jaxb.core, org.glassfish.jaxb.runtime; + opens org.apache.sis.referencing.crs to jakarta.xml.bind, org.glassfish.jaxb.core, org.glassfish.jaxb.runtime; + opens org.apache.sis.referencing.datum to jakarta.xml.bind, org.glassfish.jaxb.core, org.glassfish.jaxb.runtime; + opens org.apache.sis.referencing.operation to jakarta.xml.bind, org.glassfish.jaxb.core, org.glassfish.jaxb.runtime; +} diff --git a/core/sis-referencing/src/main/javadoc/overview.html b/core/sis-referencing/src/main/javadoc/overview.html deleted file mode 100644 index 7c4282df14..0000000000 --- a/core/sis-referencing/src/main/javadoc/overview.html +++ /dev/null @@ -1,32 +0,0 @@ -<!DOCTYPE html> - -<!-- - 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. ---> - -<html> - <head> - <title>API Overview</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> - </head> - <body> - Overview of Apache <code>sis-referencing</code> module. - This Javadoc is only about one specific module. For the full Apache SIS project, - see the <a href="http://sis.apache.org/apidocs/overview-summary.html">aggregated Javadoc</a>. - </body> -</html> diff --git a/core/sis-referencing/src/main/resources/META-INF/services/org.apache.sis.internal.jaxb.AdapterReplacement b/core/sis-referencing/src/main/resources/META-INF/services/org.apache.sis.internal.jaxb.AdapterReplacement index e37e1f8b5d..9482d00f1e 100644 --- a/core/sis-referencing/src/main/resources/META-INF/services/org.apache.sis.internal.jaxb.AdapterReplacement +++ b/core/sis-referencing/src/main/resources/META-INF/services/org.apache.sis.internal.jaxb.AdapterReplacement @@ -1,3 +1,4 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements; -# and to You under the Apache License, Version 2.0. +# Workaround for Maven bug https://issues.apache.org/jira/browse/MNG-7855 +# The content of this file is automatically derived from module-info.class file. +# Should be used only if the JAR file was on class-path rather than module-path. org.apache.sis.internal.jaxb.referencing.SC_VerticalCRS diff --git a/core/sis-referencing/src/main/resources/META-INF/services/org.apache.sis.internal.jaxb.TypeRegistration b/core/sis-referencing/src/main/resources/META-INF/services/org.apache.sis.internal.jaxb.TypeRegistration index 95e4a132a4..f542e734ed 100644 --- a/core/sis-referencing/src/main/resources/META-INF/services/org.apache.sis.internal.jaxb.TypeRegistration +++ b/core/sis-referencing/src/main/resources/META-INF/services/org.apache.sis.internal.jaxb.TypeRegistration @@ -1,3 +1,4 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements; -# and to You under the Apache License, Version 2.0. +# Workaround for Maven bug https://issues.apache.org/jira/browse/MNG-7855 +# The content of this file is automatically derived from module-info.class file. +# Should be used only if the JAR file was on class-path rather than module-path. org.apache.sis.internal.referencing.ReferencingTypes diff --git a/core/sis-referencing/src/main/resources/META-INF/services/org.apache.sis.internal.metadata.ReferencingServices b/core/sis-referencing/src/main/resources/META-INF/services/org.apache.sis.internal.metadata.ReferencingServices index 8398b4e88f..163afe3f4f 100644 --- a/core/sis-referencing/src/main/resources/META-INF/services/org.apache.sis.internal.metadata.ReferencingServices +++ b/core/sis-referencing/src/main/resources/META-INF/services/org.apache.sis.internal.metadata.ReferencingServices @@ -1 +1,4 @@ +# Workaround for Maven bug https://issues.apache.org/jira/browse/MNG-7855 +# The content of this file is automatically derived from module-info.class file. +# Should be used only if the JAR file was on class-path rather than module-path. org.apache.sis.internal.referencing.ServicesForMetadata diff --git a/core/sis-referencing/src/main/resources/META-INF/services/org.apache.sis.internal.metadata.sql.Initializer b/core/sis-referencing/src/main/resources/META-INF/services/org.apache.sis.internal.metadata.sql.Initializer index b30ed7ea7c..a37a33c95b 100644 --- a/core/sis-referencing/src/main/resources/META-INF/services/org.apache.sis.internal.metadata.sql.Initializer +++ b/core/sis-referencing/src/main/resources/META-INF/services/org.apache.sis.internal.metadata.sql.Initializer @@ -1,3 +1,4 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements; -# and to You under the Apache License, Version 2.0. +# Workaround for Maven bug https://issues.apache.org/jira/browse/MNG-7855 +# The content of this file is automatically derived from module-info.class file. +# Should be used only if the JAR file was on class-path rather than module-path. org.apache.sis.internal.referencing.DatabaseListener diff --git a/core/sis-referencing/src/main/resources/META-INF/services/org.opengis.referencing.crs.CRSAuthorityFactory b/core/sis-referencing/src/main/resources/META-INF/services/org.opengis.referencing.crs.CRSAuthorityFactory index faa30b280d..b34aca934d 100644 --- a/core/sis-referencing/src/main/resources/META-INF/services/org.opengis.referencing.crs.CRSAuthorityFactory +++ b/core/sis-referencing/src/main/resources/META-INF/services/org.opengis.referencing.crs.CRSAuthorityFactory @@ -1,4 +1,5 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements; -# and to You under the Apache License, Version 2.0. +# Workaround for Maven bug https://issues.apache.org/jira/browse/MNG-7855 +# The content of this file is automatically derived from module-info.class file. +# Should be used only if the JAR file was on class-path rather than module-path. org.apache.sis.internal.referencing.EPSGFactoryProxyCRS org.apache.sis.referencing.factory.CommonAuthorityFactory diff --git a/core/sis-referencing/src/main/resources/META-INF/services/org.opengis.referencing.crs.CRSFactory b/core/sis-referencing/src/main/resources/META-INF/services/org.opengis.referencing.crs.CRSFactory index c6ce286a25..198dd4b1bf 100644 --- a/core/sis-referencing/src/main/resources/META-INF/services/org.opengis.referencing.crs.CRSFactory +++ b/core/sis-referencing/src/main/resources/META-INF/services/org.opengis.referencing.crs.CRSFactory @@ -1,3 +1,4 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements; -# and to You under the Apache License, Version 2.0. +# Workaround for Maven bug https://issues.apache.org/jira/browse/MNG-7855 +# The content of this file is automatically derived from module-info.class file. +# Should be used only if the JAR file was on class-path rather than module-path. org.apache.sis.referencing.factory.GeodeticObjectFactory diff --git a/core/sis-referencing/src/main/resources/META-INF/services/org.opengis.referencing.cs.CSAuthorityFactory b/core/sis-referencing/src/main/resources/META-INF/services/org.opengis.referencing.cs.CSAuthorityFactory index 1073b2bb3e..e62b66b98f 100644 --- a/core/sis-referencing/src/main/resources/META-INF/services/org.opengis.referencing.cs.CSAuthorityFactory +++ b/core/sis-referencing/src/main/resources/META-INF/services/org.opengis.referencing.cs.CSAuthorityFactory @@ -1,3 +1,4 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements; -# and to You under the Apache License, Version 2.0. +# Workaround for Maven bug https://issues.apache.org/jira/browse/MNG-7855 +# The content of this file is automatically derived from module-info.class file. +# Should be used only if the JAR file was on class-path rather than module-path. org.apache.sis.internal.referencing.EPSGFactoryProxyCS diff --git a/core/sis-referencing/src/main/resources/META-INF/services/org.opengis.referencing.cs.CSFactory b/core/sis-referencing/src/main/resources/META-INF/services/org.opengis.referencing.cs.CSFactory index c6ce286a25..198dd4b1bf 100644 --- a/core/sis-referencing/src/main/resources/META-INF/services/org.opengis.referencing.cs.CSFactory +++ b/core/sis-referencing/src/main/resources/META-INF/services/org.opengis.referencing.cs.CSFactory @@ -1,3 +1,4 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements; -# and to You under the Apache License, Version 2.0. +# Workaround for Maven bug https://issues.apache.org/jira/browse/MNG-7855 +# The content of this file is automatically derived from module-info.class file. +# Should be used only if the JAR file was on class-path rather than module-path. org.apache.sis.referencing.factory.GeodeticObjectFactory diff --git a/core/sis-referencing/src/main/resources/META-INF/services/org.opengis.referencing.datum.DatumAuthorityFactory b/core/sis-referencing/src/main/resources/META-INF/services/org.opengis.referencing.datum.DatumAuthorityFactory index 9bb35f5643..f29fd9c346 100644 --- a/core/sis-referencing/src/main/resources/META-INF/services/org.opengis.referencing.datum.DatumAuthorityFactory +++ b/core/sis-referencing/src/main/resources/META-INF/services/org.opengis.referencing.datum.DatumAuthorityFactory @@ -1,3 +1,4 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements; -# and to You under the Apache License, Version 2.0. +# Workaround for Maven bug https://issues.apache.org/jira/browse/MNG-7855 +# The content of this file is automatically derived from module-info.class file. +# Should be used only if the JAR file was on class-path rather than module-path. org.apache.sis.internal.referencing.EPSGFactoryProxyDatum diff --git a/core/sis-referencing/src/main/resources/META-INF/services/org.opengis.referencing.datum.DatumFactory b/core/sis-referencing/src/main/resources/META-INF/services/org.opengis.referencing.datum.DatumFactory index c6ce286a25..198dd4b1bf 100644 --- a/core/sis-referencing/src/main/resources/META-INF/services/org.opengis.referencing.datum.DatumFactory +++ b/core/sis-referencing/src/main/resources/META-INF/services/org.opengis.referencing.datum.DatumFactory @@ -1,3 +1,4 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements; -# and to You under the Apache License, Version 2.0. +# Workaround for Maven bug https://issues.apache.org/jira/browse/MNG-7855 +# The content of this file is automatically derived from module-info.class file. +# Should be used only if the JAR file was on class-path rather than module-path. org.apache.sis.referencing.factory.GeodeticObjectFactory diff --git a/core/sis-referencing/src/main/resources/META-INF/services/org.opengis.referencing.operation.CoordinateOperationAuthorityFactory b/core/sis-referencing/src/main/resources/META-INF/services/org.opengis.referencing.operation.CoordinateOperationAuthorityFactory index 5b0c35a99b..23a581a41f 100644 --- a/core/sis-referencing/src/main/resources/META-INF/services/org.opengis.referencing.operation.CoordinateOperationAuthorityFactory +++ b/core/sis-referencing/src/main/resources/META-INF/services/org.opengis.referencing.operation.CoordinateOperationAuthorityFactory @@ -1,3 +1,4 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements; -# and to You under the Apache License, Version 2.0. +# Workaround for Maven bug https://issues.apache.org/jira/browse/MNG-7855 +# The content of this file is automatically derived from module-info.class file. +# Should be used only if the JAR file was on class-path rather than module-path. org.apache.sis.internal.referencing.EPSGFactoryProxyCOP diff --git a/core/sis-referencing/src/main/resources/META-INF/services/org.opengis.referencing.operation.CoordinateOperationFactory b/core/sis-referencing/src/main/resources/META-INF/services/org.opengis.referencing.operation.CoordinateOperationFactory index dab289fec5..f64f6b6c11 100644 --- a/core/sis-referencing/src/main/resources/META-INF/services/org.opengis.referencing.operation.CoordinateOperationFactory +++ b/core/sis-referencing/src/main/resources/META-INF/services/org.opengis.referencing.operation.CoordinateOperationFactory @@ -1,3 +1,4 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements; -# and to You under the Apache License, Version 2.0. +# Workaround for Maven bug https://issues.apache.org/jira/browse/MNG-7855 +# The content of this file is automatically derived from module-info.class file. +# Should be used only if the JAR file was on class-path rather than module-path. org.apache.sis.referencing.operation.DefaultCoordinateOperationFactory diff --git a/core/sis-referencing/src/main/resources/META-INF/services/org.opengis.referencing.operation.MathTransformFactory b/core/sis-referencing/src/main/resources/META-INF/services/org.opengis.referencing.operation.MathTransformFactory index f14a86c3d6..429c4239fe 100644 --- a/core/sis-referencing/src/main/resources/META-INF/services/org.opengis.referencing.operation.MathTransformFactory +++ b/core/sis-referencing/src/main/resources/META-INF/services/org.opengis.referencing.operation.MathTransformFactory @@ -1,3 +1,4 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements; -# and to You under the Apache License, Version 2.0. +# Workaround for Maven bug https://issues.apache.org/jira/browse/MNG-7855 +# The content of this file is automatically derived from module-info.class file. +# Should be used only if the JAR file was on class-path rather than module-path. org.apache.sis.referencing.operation.transform.DefaultMathTransformFactory diff --git a/core/sis-referencing/src/main/resources/META-INF/services/org.opengis.referencing.operation.OperationMethod b/core/sis-referencing/src/main/resources/META-INF/services/org.opengis.referencing.operation.OperationMethod index 4c04e55057..cd73e24d2c 100644 --- a/core/sis-referencing/src/main/resources/META-INF/services/org.opengis.referencing.operation.OperationMethod +++ b/core/sis-referencing/src/main/resources/META-INF/services/org.opengis.referencing.operation.OperationMethod @@ -1,8 +1,6 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements; -# and to You under the Apache License, Version 2.0. - -# Heavier classes (e.g. having more dependencies) or classes less likely to be used, should be last. - +# Workaround for Maven bug https://issues.apache.org/jira/browse/MNG-7855 +# The content of this file is automatically derived from module-info.class file. +# Should be used only if the JAR file was on class-path rather than module-path. org.apache.sis.internal.referencing.provider.Affine org.apache.sis.internal.referencing.provider.AxisOrderReversal org.apache.sis.internal.referencing.provider.AxisOrderReversal3D diff --git a/core/sis-utility/pom.xml b/core/sis-utility/pom.xml index b486274f4f..09775ebe72 100644 --- a/core/sis-utility/pom.xml +++ b/core/sis-utility/pom.xml @@ -112,28 +112,4 @@ </roles> </contributor> </contributors> - - - <!-- =========================================================== - Build configuration - =========================================================== --> - <build> - <plugins> - <!-- Anticipation for Java 9 --> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-jar-plugin</artifactId> - <configuration> - <archive> - <manifestEntries> - <Automatic-Module-Name> - org.apache.sis.util - </Automatic-Module-Name> - </manifestEntries> - </archive> - </configuration> - </plugin> - </plugins> - </build> - </project> diff --git a/core/sis-utility/src/main/java/module-info.java b/core/sis-utility/src/main/java/module-info.java new file mode 100644 index 0000000000..f7132f8ec9 --- /dev/null +++ b/core/sis-utility/src/main/java/module-info.java @@ -0,0 +1,165 @@ +/* + * 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. + */ + +/** + * Units of measurement and miscellaneous utility methods required by Apache SIS. + * It includes a few mathematical functions, collection classes, I/O utilities, + * operations on common Java types like Arrays and character strings, logging, and more. + * + * <p>Some functionalities provided by this module may overlap some external libraries + * like Common Logging and Commons collections. + * Since this is not the purpose of this module to compete with dedicated libraries, + * this module should be considered as mostly internal to the Apache SIS project. + * For example any future SIS release may change the collection implementations + * (how they perform synchronizations, how they handle exceptions, <i>etc.</i>) + * in order to fit SIS needs.</p> + * + * @author Martin Desruisseaux (MPO, IRD, Geomatys) + * @author Alexis Manin (Geomatys) + * @version 1.4 + * @since 0.3 + */ +module org.apache.sis.util { + requires java.sql; + requires java.management; + requires transitive java.logging; + requires transitive java.measure; + requires transitive org.opengis.geoapi.pending; + + provides javax.measure.spi.ServiceProvider + with org.apache.sis.measure.UnitServices; + + provides org.apache.sis.util.ObjectConverter + with org.apache.sis.internal.converter.StringConverter.Number, + org.apache.sis.internal.converter.StringConverter.Byte, + org.apache.sis.internal.converter.StringConverter.Short, + org.apache.sis.internal.converter.StringConverter.Integer, + org.apache.sis.internal.converter.StringConverter.Long, + org.apache.sis.internal.converter.StringConverter.Float, + org.apache.sis.internal.converter.StringConverter.Double, + org.apache.sis.internal.converter.StringConverter.BigInteger, + org.apache.sis.internal.converter.StringConverter.BigDecimal, + org.apache.sis.internal.converter.StringConverter.Boolean, + org.apache.sis.internal.converter.StringConverter.Locale, + org.apache.sis.internal.converter.StringConverter.Charset, + org.apache.sis.internal.converter.StringConverter.InternationalString, + org.apache.sis.internal.converter.StringConverter.File, + org.apache.sis.internal.converter.StringConverter.Path, + org.apache.sis.internal.converter.StringConverter.URI, + org.apache.sis.internal.converter.StringConverter.URL, + org.apache.sis.internal.converter.StringConverter.Unit, + org.apache.sis.internal.converter.StringConverter.Angle, + org.apache.sis.internal.converter.AngleConverter, + org.apache.sis.internal.converter.AngleConverter.Inverse, + org.apache.sis.internal.converter.PathConverter.FilePath, + org.apache.sis.internal.converter.PathConverter.URLPath, + org.apache.sis.internal.converter.PathConverter.URIPath, + org.apache.sis.internal.converter.PathConverter.PathURI, + org.apache.sis.internal.converter.PathConverter.PathURL, + org.apache.sis.internal.converter.PathConverter.PathFile, + org.apache.sis.internal.converter.PathConverter.FileURI, + org.apache.sis.internal.converter.PathConverter.FileURL, + org.apache.sis.internal.converter.PathConverter.URLFile, + org.apache.sis.internal.converter.PathConverter.URIFile, + org.apache.sis.internal.converter.PathConverter.URL_URI, + org.apache.sis.internal.converter.PathConverter.URI_URL, + org.apache.sis.internal.converter.DateConverter.Long, + org.apache.sis.internal.converter.DateConverter.SQL, + org.apache.sis.internal.converter.DateConverter.Timestamp, + org.apache.sis.internal.converter.CollectionConverter.List, + org.apache.sis.internal.converter.CollectionConverter.Set, + org.apache.sis.internal.converter.FractionConverter, + org.apache.sis.internal.converter.FractionConverter.FromInteger; + + uses org.apache.sis.util.ObjectConverter; + uses org.apache.sis.setup.InstallationResources; + uses org.apache.sis.internal.util.MetadataServices; + + exports org.apache.sis.io; + exports org.apache.sis.math; + exports org.apache.sis.measure; + exports org.apache.sis.setup; + exports org.apache.sis.util; + exports org.apache.sis.util.collection; + exports org.apache.sis.util.logging; + + exports org.apache.sis.util.resources to + org.apache.sis.metadata, + org.apache.sis.referencing, + org.apache.sis.referencing.gazetteer, + org.apache.sis.feature, + org.apache.sis.storage, + org.apache.sis.storage.xml, + org.apache.sis.storage.sql, + org.apache.sis.storage.netcdf, + org.apache.sis.storage.geotiff, + org.apache.sis.storage.earthobservation, + org.apache.sis.portrayal, + org.apache.sis.cloud.aws, + org.apache.sis.console, + org.apache.sis.openoffice, + org.apache.sis.gui; // In the "optional" sub-project. + + exports org.apache.sis.internal.util to + org.apache.sis.metadata, + org.apache.sis.referencing, + org.apache.sis.referencing.gazetteer, + org.apache.sis.feature, + org.apache.sis.storage, + org.apache.sis.storage.xml, + org.apache.sis.storage.sql, + org.apache.sis.storage.netcdf, + org.apache.sis.storage.geotiff, + org.apache.sis.storage.earthobservation, + org.apache.sis.cql, // In the "incubator" sub-project. + org.apache.sis.portrayal, + org.apache.sis.cloud.aws, + org.apache.sis.console, + org.apache.sis.gui; // In the "optional" sub-project. + + exports org.apache.sis.internal.temporal to + org.apache.sis.metadata; + + exports org.apache.sis.internal.converter to + org.apache.sis.metadata, + org.apache.sis.referencing, + org.apache.sis.feature, + org.apache.sis.storage; + + exports org.apache.sis.internal.system to + org.apache.sis.metadata, + org.apache.sis.referencing, + org.apache.sis.referencing.gazetteer, + org.apache.sis.feature, + org.apache.sis.storage, + org.apache.sis.storage.xml, + org.apache.sis.storage.sql, + org.apache.sis.storage.shapefile, + org.apache.sis.storage.netcdf, + org.apache.sis.storage.geotiff, + org.apache.sis.storage.earthobservation, + org.apache.sis.portrayal, + org.apache.sis.console, + org.apache.sis.webapp, // In the "incubator" sub-project. + org.apache.sis.gui; // In the "optional" sub-project. + + exports org.apache.sis.internal.jdk17 to + org.apache.sis.feature, + org.apache.sis.storage, + org.apache.sis.storage.sql, + org.apache.sis.storage.geotiff; +} diff --git a/core/sis-utility/src/main/javadoc/overview.html b/core/sis-utility/src/main/javadoc/overview.html deleted file mode 100644 index 66dacb1da3..0000000000 --- a/core/sis-utility/src/main/javadoc/overview.html +++ /dev/null @@ -1,47 +0,0 @@ -<!DOCTYPE html> - -<!-- - 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. ---> - -<html> - <head> - <title>API Overview</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> - </head> - <body> - Overview of Apache <code>sis-utility</code> module. - This Javadoc is only about one specific module. For the full Apache SIS project, - see the <a href="http://sis.apache.org/apidocs/overview-summary.html">aggregated Javadoc</a>. - - <p>The <code>sis-utility</code> module provides simple data objects and miscellaneous utilities. - The services provided by this module include internationalization, operations on common Java types - like Arrays and character strings, logging, and more.</p> - - <p>Some functionalities provided by this module may overlap some external libraries like - <code>common-logging</code> and <code>commons-collections</code>. However, this module often implement - them in a slightly different way. For example, instead of defining new API for logging operations, - SIS uses the standard Java logging framework with optional adaptors on top of <code>java.util.logging.Logger</code> - for users who want to redirect to other logging frameworks.</p> - - <p>Since this is not the purpose of this module to compete with dedicated libraries, this - module should be considered as mostly internal to the Apache SIS project. For example - any future SIS release may change the collection implementations (how they perform - synchronizations, how they handle exceptions, <i>etc.</i>) in order to fit SIS needs.</p> - </body> -</html> diff --git a/core/sis-utility/src/main/resources/META-INF/services/javax.measure.spi.ServiceProvider b/core/sis-utility/src/main/resources/META-INF/services/javax.measure.spi.ServiceProvider index f242817f2d..93cb603f35 100644 --- a/core/sis-utility/src/main/resources/META-INF/services/javax.measure.spi.ServiceProvider +++ b/core/sis-utility/src/main/resources/META-INF/services/javax.measure.spi.ServiceProvider @@ -1,3 +1,4 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements; -# and to You under the Apache License, Version 2.0. +# Workaround for Maven bug https://issues.apache.org/jira/browse/MNG-7855 +# The content of this file is automatically derived from module-info.class file. +# Should be used only if the JAR file was on class-path rather than module-path. org.apache.sis.measure.UnitServices diff --git a/core/sis-utility/src/main/resources/META-INF/services/org.apache.sis.util.ObjectConverter b/core/sis-utility/src/main/resources/META-INF/services/org.apache.sis.util.ObjectConverter index 3010d80027..0daa52e916 100644 --- a/core/sis-utility/src/main/resources/META-INF/services/org.apache.sis.util.ObjectConverter +++ b/core/sis-utility/src/main/resources/META-INF/services/org.apache.sis.util.ObjectConverter @@ -1,8 +1,6 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements; -# and to You under the Apache License, Version 2.0. - -# Loaded by org.apache.sis.internal.converter.ConverterRegistry. - +# Workaround for Maven bug https://issues.apache.org/jira/browse/MNG-7855 +# The content of this file is automatically derived from module-info.class file. +# Should be used only if the JAR file was on class-path rather than module-path. org.apache.sis.internal.converter.StringConverter$Number org.apache.sis.internal.converter.StringConverter$Byte org.apache.sis.internal.converter.StringConverter$Short diff --git a/pom.xml b/pom.xml index e9487aad3c..637d3df5bc 100644 --- a/pom.xml +++ b/pom.xml @@ -779,7 +779,7 @@ </goals> <configuration> <skip>${skipTests}</skip> <!-- When skipping tests, skip also checkstyle verification. --> - <excludes>**/generated/**/*</excludes> <!-- Skip generated source code, e.g. classes created by JMH. --> + <excludes>**/module-info.java</excludes> <!-- Avoid "no viable alternative at input 'module'" error. --> <encoding>${project.build.sourceEncoding}</encoding> <consoleOutput>true</consoleOutput> <checkstyleRules> diff --git a/profiles/sis-french-profile/pom.xml b/profiles/sis-french-profile/pom.xml index efcfb9f857..b505d0ea45 100644 --- a/profiles/sis-french-profile/pom.xml +++ b/profiles/sis-french-profile/pom.xml @@ -83,28 +83,6 @@ </contributors> - <!-- =========================================================== - Build configuration - =========================================================== --> - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-jar-plugin</artifactId> - <configuration> - <archive> - <manifestEntries> - <Automatic-Module-Name> - org.apache.sis.profile.france - </Automatic-Module-Name> - </manifestEntries> - </archive> - </configuration> - </plugin> - </plugins> - </build> - - <!-- =========================================================== Dependencies =========================================================== --> diff --git a/profiles/sis-french-profile/src/main/java/module-info.java b/profiles/sis-french-profile/src/main/java/module-info.java new file mode 100644 index 0000000000..f1183935f6 --- /dev/null +++ b/profiles/sis-french-profile/src/main/java/module-info.java @@ -0,0 +1,36 @@ +/* + * 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. + */ + +/** + * French profile of metadata. + * + * @author Cédric Briançon (Geomatys) + * @author Guilhem Legal (Geomatys) + * @version 1.4 + * @since 0.4 + */ +module org.apache.sis.profile.france { + requires jakarta.xml.bind; + requires transitive org.apache.sis.metadata; + + provides org.apache.sis.internal.jaxb.TypeRegistration + with org.apache.sis.internal.profile.fra.ProfileTypes; + + exports org.apache.sis.profile.france; + + opens org.apache.sis.internal.profile.fra to jakarta.xml.bind; +} diff --git a/profiles/sis-french-profile/src/main/resources/META-INF/services/org.apache.sis.internal.jaxb.TypeRegistration b/profiles/sis-french-profile/src/main/resources/META-INF/services/org.apache.sis.internal.jaxb.TypeRegistration index 9189cadfe9..0e85e85658 100644 --- a/profiles/sis-french-profile/src/main/resources/META-INF/services/org.apache.sis.internal.jaxb.TypeRegistration +++ b/profiles/sis-french-profile/src/main/resources/META-INF/services/org.apache.sis.internal.jaxb.TypeRegistration @@ -1 +1,4 @@ +# Workaround for Maven bug https://issues.apache.org/jira/browse/MNG-7855 +# The content of this file is automatically derived from module-info.class file. +# Should be used only if the JAR file was on class-path rather than module-path. org.apache.sis.internal.profile.fra.ProfileTypes diff --git a/profiles/sis-japan-profile/pom.xml b/profiles/sis-japan-profile/pom.xml index b131230988..c14188a775 100644 --- a/profiles/sis-japan-profile/pom.xml +++ b/profiles/sis-japan-profile/pom.xml @@ -61,28 +61,6 @@ </developers> - <!-- =========================================================== - Build configuration - =========================================================== --> - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-jar-plugin</artifactId> - <configuration> - <archive> - <manifestEntries> - <Automatic-Module-Name> - org.apache.sis.profile.japan - </Automatic-Module-Name> - </manifestEntries> - </archive> - </configuration> - </plugin> - </plugins> - </build> - - <!-- =========================================================== Dependencies The GCOM data are distributed as HDF5 files, which SIS diff --git a/profiles/sis-japan-profile/src/main/java/module-info.java b/profiles/sis-japan-profile/src/main/java/module-info.java new file mode 100644 index 0000000000..bd5df892fe --- /dev/null +++ b/profiles/sis-japan-profile/src/main/java/module-info.java @@ -0,0 +1,37 @@ +/* + * 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. + */ + +/** + * Japanese profile of netCDF store. + * + * @author Martin Desruisseaux (Geomatys) + * @version 1.4 + * @since 1.0 + */ +module org.apache.sis.profile.japan { + requires transitive org.apache.sis.storage.netcdf; + requires cdm.core; + + provides org.apache.sis.internal.netcdf.Convention + with org.apache.sis.internal.earth.netcdf.GCOM_C, + org.apache.sis.internal.earth.netcdf.GCOM_W; + + provides ucar.nc2.dataset.spi.CoordSystemBuilderFactory + with org.apache.sis.internal.earth.netcdf.FactoryForUCAR; + + exports org.apache.sis.profile.japan; +} diff --git a/profiles/sis-japan-profile/src/main/resources/META-INF/services/org.apache.sis.internal.netcdf.Convention b/profiles/sis-japan-profile/src/main/resources/META-INF/services/org.apache.sis.internal.netcdf.Convention index 04d3c1dd9c..427b2d392c 100644 --- a/profiles/sis-japan-profile/src/main/resources/META-INF/services/org.apache.sis.internal.netcdf.Convention +++ b/profiles/sis-japan-profile/src/main/resources/META-INF/services/org.apache.sis.internal.netcdf.Convention @@ -1,2 +1,5 @@ +# Workaround for Maven bug https://issues.apache.org/jira/browse/MNG-7855 +# The content of this file is automatically derived from module-info.class file. +# Should be used only if the JAR file was on class-path rather than module-path. org.apache.sis.internal.earth.netcdf.GCOM_C org.apache.sis.internal.earth.netcdf.GCOM_W diff --git a/profiles/sis-japan-profile/src/main/resources/META-INF/services/ucar.nc2.dataset.spi.CoordSystemBuilderFactory b/profiles/sis-japan-profile/src/main/resources/META-INF/services/ucar.nc2.dataset.spi.CoordSystemBuilderFactory index 5922dbb09a..da66943f71 100644 --- a/profiles/sis-japan-profile/src/main/resources/META-INF/services/ucar.nc2.dataset.spi.CoordSystemBuilderFactory +++ b/profiles/sis-japan-profile/src/main/resources/META-INF/services/ucar.nc2.dataset.spi.CoordSystemBuilderFactory @@ -1 +1,4 @@ +# Workaround for Maven bug https://issues.apache.org/jira/browse/MNG-7855 +# The content of this file is automatically derived from module-info.class file. +# Should be used only if the JAR file was on class-path rather than module-path. org.apache.sis.internal.earth.netcdf.FactoryForUCAR diff --git a/storage/sis-earth-observation/pom.xml b/storage/sis-earth-observation/pom.xml index a3c9b828da..72ff9e7b9d 100644 --- a/storage/sis-earth-observation/pom.xml +++ b/storage/sis-earth-observation/pom.xml @@ -94,28 +94,6 @@ </contributors> - <!-- =========================================================== - Build configuration - =========================================================== --> - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-jar-plugin</artifactId> - <configuration> - <archive> - <manifestEntries> - <Automatic-Module-Name> - org.apache.sis.storage.earthobservation - </Automatic-Module-Name> - </manifestEntries> - </archive> - </configuration> - </plugin> - </plugins> - </build> - - <!-- =========================================================== Dependencies =========================================================== --> diff --git a/storage/sis-earth-observation/src/main/java/module-info.java b/storage/sis-earth-observation/src/main/java/module-info.java new file mode 100644 index 0000000000..37a0ea58ef --- /dev/null +++ b/storage/sis-earth-observation/src/main/java/module-info.java @@ -0,0 +1,35 @@ +/* + * 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. + */ + +/** + * Earth observation stores. + * + * @author Rémi Maréchal (Geomatys) + * @author Thi Phuong Hao Nguyen (VNSC) + * @author Minh Chinh Vu (VNSC) + * @author Martin Desruisseaux (Geomatys) + * @version 1.4 + * @since 0.8 + */ +module org.apache.sis.storage.earthobservation { + requires transitive org.apache.sis.storage.geotiff; + + provides org.apache.sis.storage.DataStoreProvider + with org.apache.sis.storage.landsat.LandsatStoreProvider; + + exports org.apache.sis.storage.landsat; +} diff --git a/storage/sis-earth-observation/src/main/resources/META-INF/services/org.apache.sis.storage.DataStoreProvider b/storage/sis-earth-observation/src/main/resources/META-INF/services/org.apache.sis.storage.DataStoreProvider index c01464d929..b6449abac2 100644 --- a/storage/sis-earth-observation/src/main/resources/META-INF/services/org.apache.sis.storage.DataStoreProvider +++ b/storage/sis-earth-observation/src/main/resources/META-INF/services/org.apache.sis.storage.DataStoreProvider @@ -1 +1,4 @@ +# Workaround for Maven bug https://issues.apache.org/jira/browse/MNG-7855 +# The content of this file is automatically derived from module-info.class file. +# Should be used only if the JAR file was on class-path rather than module-path. org.apache.sis.storage.landsat.LandsatStoreProvider diff --git a/storage/sis-geotiff/pom.xml b/storage/sis-geotiff/pom.xml index a567b35118..128414d9c7 100644 --- a/storage/sis-geotiff/pom.xml +++ b/storage/sis-geotiff/pom.xml @@ -94,28 +94,6 @@ </contributors> - <!-- =========================================================== - Build configuration - =========================================================== --> - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-jar-plugin</artifactId> - <configuration> - <archive> - <manifestEntries> - <Automatic-Module-Name> - org.apache.sis.storage.geotiff - </Automatic-Module-Name> - </manifestEntries> - </archive> - </configuration> - </plugin> - </plugins> - </build> - - <!-- =========================================================== Dependencies =========================================================== --> diff --git a/storage/sis-geotiff/src/main/java/module-info.java b/storage/sis-geotiff/src/main/java/module-info.java new file mode 100644 index 0000000000..84b78171c8 --- /dev/null +++ b/storage/sis-geotiff/src/main/java/module-info.java @@ -0,0 +1,39 @@ +/* + * 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. + */ + +/** + * GeoTIFF store. + * + * @author Rémi Maréchal (Geomatys) + * @author Thi Phuong Hao Nguyen (VNSC) + * @author Minh Chinh Vu (VNSC) + * @author Martin Desruisseaux (Geomatys) + * @version 1.4 + * @since 0.8 + */ +module org.apache.sis.storage.geotiff { + requires jakarta.xml.bind; + requires transitive org.apache.sis.storage; + + provides org.apache.sis.storage.DataStoreProvider + with org.apache.sis.storage.geotiff.GeoTiffStoreProvider; + + exports org.apache.sis.storage.geotiff; + + exports org.apache.sis.internal.geotiff to + org.apache.sis.storage.earthobservation; +} diff --git a/storage/sis-geotiff/src/main/resources/META-INF/services/org.apache.sis.storage.DataStoreProvider b/storage/sis-geotiff/src/main/resources/META-INF/services/org.apache.sis.storage.DataStoreProvider index 8a05e99b31..5612a7fb28 100644 --- a/storage/sis-geotiff/src/main/resources/META-INF/services/org.apache.sis.storage.DataStoreProvider +++ b/storage/sis-geotiff/src/main/resources/META-INF/services/org.apache.sis.storage.DataStoreProvider @@ -1 +1,4 @@ +# Workaround for Maven bug https://issues.apache.org/jira/browse/MNG-7855 +# The content of this file is automatically derived from module-info.class file. +# Should be used only if the JAR file was on class-path rather than module-path. org.apache.sis.storage.geotiff.GeoTiffStoreProvider diff --git a/storage/sis-netcdf/pom.xml b/storage/sis-netcdf/pom.xml index 8cad79a294..7773656270 100644 --- a/storage/sis-netcdf/pom.xml +++ b/storage/sis-netcdf/pom.xml @@ -83,28 +83,6 @@ </contributors> - <!-- =========================================================== - Build configuration - =========================================================== --> - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-jar-plugin</artifactId> - <configuration> - <archive> - <manifestEntries> - <Automatic-Module-Name> - org.apache.sis.storage.netcdf - </Automatic-Module-Name> - </manifestEntries> - </archive> - </configuration> - </plugin> - </plugins> - </build> - - <!-- =========================================================== Dependencies =========================================================== --> diff --git a/storage/sis-netcdf/src/main/java/module-info.java b/storage/sis-netcdf/src/main/java/module-info.java new file mode 100644 index 0000000000..cfc8304a1e --- /dev/null +++ b/storage/sis-netcdf/src/main/java/module-info.java @@ -0,0 +1,40 @@ +/* + * 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. + */ + +/** + * NetCDF store. + * + * @author Martin Desruisseaux (IRD, Geomatys) + * @version 1.4 + * @since 0.3 + */ +module org.apache.sis.storage.netcdf { + requires transitive org.apache.sis.storage; + requires static cdm.core; + requires static udunits; + requires static com.google.common; + + uses org.apache.sis.internal.netcdf.Convention; + + provides org.apache.sis.storage.DataStoreProvider + with org.apache.sis.storage.netcdf.NetcdfStoreProvider; + + exports org.apache.sis.storage.netcdf; + + exports org.apache.sis.internal.netcdf to + org.apache.sis.profile.japan; +} diff --git a/storage/sis-netcdf/src/main/resources/META-INF/services/org.apache.sis.storage.DataStoreProvider b/storage/sis-netcdf/src/main/resources/META-INF/services/org.apache.sis.storage.DataStoreProvider index 024a2745b1..ef5905e096 100644 --- a/storage/sis-netcdf/src/main/resources/META-INF/services/org.apache.sis.storage.DataStoreProvider +++ b/storage/sis-netcdf/src/main/resources/META-INF/services/org.apache.sis.storage.DataStoreProvider @@ -1 +1,4 @@ +# Workaround for Maven bug https://issues.apache.org/jira/browse/MNG-7855 +# The content of this file is automatically derived from module-info.class file. +# Should be used only if the JAR file was on class-path rather than module-path. org.apache.sis.storage.netcdf.NetcdfStoreProvider diff --git a/storage/sis-shapefile/pom.xml b/storage/sis-shapefile/pom.xml index f4db4ce369..e5838ac06d 100644 --- a/storage/sis-shapefile/pom.xml +++ b/storage/sis-shapefile/pom.xml @@ -78,21 +78,6 @@ </executions> </plugin> - <!-- Anticipation for Java 9 --> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-jar-plugin</artifactId> - <configuration> - <archive> - <manifestEntries> - <Automatic-Module-Name> - org.apache.sis.storage.shapefile - </Automatic-Module-Name> - </manifestEntries> - </archive> - </configuration> - </plugin> - <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-checkstyle-plugin</artifactId> diff --git a/storage/sis-shapefile/src/main/java/module-info.java b/storage/sis-shapefile/src/main/java/module-info.java new file mode 100644 index 0000000000..1a2171b427 --- /dev/null +++ b/storage/sis-shapefile/src/main/java/module-info.java @@ -0,0 +1,33 @@ +/* + * 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. + */ + +/** + * Shapefile store. + * + * @author Travis L. Pinney + * @author Marc Le Bihan + * @version 0.5 + * @since 0.5 + */ +module org.apache.sis.storage.shapefile { + requires java.sql; + requires esri.geometry.api; + requires transitive org.apache.sis.storage; + + exports org.apache.sis.storage.shapefile; + exports org.apache.sis.storage.shapefile.cpg; +} diff --git a/storage/sis-sqlstore/pom.xml b/storage/sis-sqlstore/pom.xml index ced6d6b1c3..eb4cdfb786 100644 --- a/storage/sis-sqlstore/pom.xml +++ b/storage/sis-sqlstore/pom.xml @@ -77,21 +77,6 @@ </execution> </executions> </plugin> - - <!-- Anticipation for Java 9 --> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-jar-plugin</artifactId> - <configuration> - <archive> - <manifestEntries> - <Automatic-Module-Name> - org.apache.sis.storage.sql - </Automatic-Module-Name> - </manifestEntries> - </archive> - </configuration> - </plugin> </plugins> </build> diff --git a/storage/sis-sqlstore/src/main/java/module-info.java b/storage/sis-sqlstore/src/main/java/module-info.java new file mode 100644 index 0000000000..90a561b5a0 --- /dev/null +++ b/storage/sis-sqlstore/src/main/java/module-info.java @@ -0,0 +1,33 @@ +/* + * 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. + */ + +/** + * SQL databases store. + * + * @author Johann Sorel (Geomatys) + * @author Martin Desruisseaux (Geomatys) + * @author Alexis Manin (Geomatys) + * @version 1.4 + * @since 1.0 + */ +module org.apache.sis.storage.sql { + requires java.sql; + requires transitive org.apache.sis.storage; + requires static org.postgresql.jdbc; + + exports org.apache.sis.storage.sql; +} diff --git a/storage/sis-storage/pom.xml b/storage/sis-storage/pom.xml index 0ea3713131..e9a1611c5f 100644 --- a/storage/sis-storage/pom.xml +++ b/storage/sis-storage/pom.xml @@ -95,28 +95,6 @@ </developers> - <!-- =========================================================== - Build configuration - =========================================================== --> - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-jar-plugin</artifactId> - <configuration> - <archive> - <manifestEntries> - <Automatic-Module-Name> - org.apache.sis.storage - </Automatic-Module-Name> - </manifestEntries> - </archive> - </configuration> - </plugin> - </plugins> - </build> - - <!-- =========================================================== Dependencies =========================================================== --> diff --git a/storage/sis-storage/src/main/java/module-info.java b/storage/sis-storage/src/main/java/module-info.java new file mode 100644 index 0000000000..cceb6bdff6 --- /dev/null +++ b/storage/sis-storage/src/main/java/module-info.java @@ -0,0 +1,80 @@ +/* + * 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. + */ + +/** + * Raster imagery and geometry features. + * + * @author Johann Sorel (Geomatys) + * @author Martin Desruisseaux (Geomatys) + * @version 1.4 + * @since 0.3 + */ +module org.apache.sis.storage { + requires java.sql; + requires java.net.http; + requires jakarta.xml.bind; + requires transitive org.apache.sis.feature; + + provides java.nio.file.spi.FileTypeDetector + with org.apache.sis.internal.storage.StoreTypeDetector; + + uses org.apache.sis.storage.DataStoreProvider; + provides org.apache.sis.storage.DataStoreProvider + with org.apache.sis.internal.storage.image.WorldFileStoreProvider, + org.apache.sis.internal.storage.esri.AsciiGridStoreProvider, + org.apache.sis.internal.storage.esri.RawRasterStoreProvider, + org.apache.sis.internal.storage.csv.StoreProvider, + org.apache.sis.internal.storage.xml.StoreProvider, + org.apache.sis.internal.storage.wkt.StoreProvider, + org.apache.sis.internal.storage.folder.StoreProvider; + + exports org.apache.sis.storage; + exports org.apache.sis.storage.event; + exports org.apache.sis.storage.tiling; + exports org.apache.sis.storage.aggregate; + + exports org.apache.sis.internal.storage to + org.apache.sis.storage.xml, + org.apache.sis.storage.sql, + org.apache.sis.storage.netcdf, + org.apache.sis.storage.geotiff, + org.apache.sis.storage.earthobservation, + org.apache.sis.console, + org.apache.sis.openoffice, + org.apache.sis.gui; // In the "optional" sub-project. + + exports org.apache.sis.internal.storage.io to + org.apache.sis.storage.xml, + org.apache.sis.storage.sql, + org.apache.sis.storage.netcdf, + org.apache.sis.storage.geotiff, + org.apache.sis.cloud.aws, + org.apache.sis.gui; // In the "optional" sub-project. + + exports org.apache.sis.internal.storage.xml to + org.apache.sis.storage.xml, + org.apache.sis.gui; // In the "optional" sub-project. + + exports org.apache.sis.internal.storage.wkt to + org.apache.sis.storage.netcdf, + org.apache.sis.storage.earthobservation, + org.apache.sis.gui; // In the "optional" sub-project. + + exports org.apache.sis.internal.storage.folder to + org.apache.sis.storage.earthobservation, + org.apache.sis.gui; // In the "optional" sub-project. +} diff --git a/storage/sis-storage/src/main/resources/META-INF/services/java.nio.file.spi.FileTypeDetector b/storage/sis-storage/src/main/resources/META-INF/services/java.nio.file.spi.FileTypeDetector index f8debc5291..68d1577c89 100644 --- a/storage/sis-storage/src/main/resources/META-INF/services/java.nio.file.spi.FileTypeDetector +++ b/storage/sis-storage/src/main/resources/META-INF/services/java.nio.file.spi.FileTypeDetector @@ -1 +1,4 @@ +# Workaround for Maven bug https://issues.apache.org/jira/browse/MNG-7855 +# The content of this file is automatically derived from module-info.class file. +# Should be used only if the JAR file was on class-path rather than module-path. org.apache.sis.internal.storage.StoreTypeDetector diff --git a/storage/sis-storage/src/main/resources/META-INF/services/org.apache.sis.storage.DataStoreProvider b/storage/sis-storage/src/main/resources/META-INF/services/org.apache.sis.storage.DataStoreProvider index d4739b5c1e..66b26bb463 100644 --- a/storage/sis-storage/src/main/resources/META-INF/services/org.apache.sis.storage.DataStoreProvider +++ b/storage/sis-storage/src/main/resources/META-INF/services/org.apache.sis.storage.DataStoreProvider @@ -1,3 +1,6 @@ +# Workaround for Maven bug https://issues.apache.org/jira/browse/MNG-7855 +# The content of this file is automatically derived from module-info.class file. +# Should be used only if the JAR file was on class-path rather than module-path. org.apache.sis.internal.storage.image.WorldFileStoreProvider org.apache.sis.internal.storage.esri.AsciiGridStoreProvider org.apache.sis.internal.storage.esri.RawRasterStoreProvider diff --git a/storage/sis-xmlstore/pom.xml b/storage/sis-xmlstore/pom.xml index 11a6c5786a..13e9fb93aa 100644 --- a/storage/sis-xmlstore/pom.xml +++ b/storage/sis-xmlstore/pom.xml @@ -80,21 +80,6 @@ </execution> </executions> </plugin> - - <!-- Anticipation for Java 9 --> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-jar-plugin</artifactId> - <configuration> - <archive> - <manifestEntries> - <Automatic-Module-Name> - org.apache.sis.storage.xml - </Automatic-Module-Name> - </manifestEntries> - </archive> - </configuration> - </plugin> </plugins> </build> diff --git a/storage/sis-xmlstore/src/main/java/module-info.java b/storage/sis-xmlstore/src/main/java/module-info.java new file mode 100644 index 0000000000..056894e1d9 --- /dev/null +++ b/storage/sis-xmlstore/src/main/java/module-info.java @@ -0,0 +1,44 @@ +/* + * 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. + */ + +/** + * XML files store. + * + * @author Johann Sorel (Geomatys) + * @author Martin Desruisseaux (Geomatys) + * @version 1.4 + * @since 0.8 + */ +module org.apache.sis.storage.xml { + requires jakarta.xml.bind; + requires transitive org.apache.sis.storage; + + provides org.apache.sis.storage.DataStoreProvider + with org.apache.sis.internal.storage.gpx.StoreProvider; + + exports org.apache.sis.storage.gps; + + exports org.apache.sis.internal.storage.gpx to + org.apache.sis.console, + org.apache.sis.gui; // In the "optional" sub-project. + + /* + * Allow JAXB to use reflection for marshalling and + * unmarshalling Apache SIS objects in XML documents. + */ + opens org.apache.sis.internal.storage.gpx to jakarta.xml.bind; +} diff --git a/storage/sis-xmlstore/src/main/resources/META-INF/services/org.apache.sis.storage.DataStoreProvider b/storage/sis-xmlstore/src/main/resources/META-INF/services/org.apache.sis.storage.DataStoreProvider index 700a4d6dcf..a3d4974589 100644 --- a/storage/sis-xmlstore/src/main/resources/META-INF/services/org.apache.sis.storage.DataStoreProvider +++ b/storage/sis-xmlstore/src/main/resources/META-INF/services/org.apache.sis.storage.DataStoreProvider @@ -1 +1,4 @@ +# Workaround for Maven bug https://issues.apache.org/jira/browse/MNG-7855 +# The content of this file is automatically derived from module-info.class file. +# Should be used only if the JAR file was on class-path rather than module-path. org.apache.sis.internal.storage.gpx.StoreProvider
