I am trying to convert my application to use Java 11 and the java module system, but am having difficulty discovering which "requires" statements to add to my module-info.java. I am currently getting the error "The project was not built since its build path is incomplete. Cannot find the class file for org.locationtech.jts.geom.Envelope. Fix the build path then try building this project"
.
I have searched through https://github.com/geotools/geotools, but I cannot find any hints regarding which modules expose which packages. For example there is a module "org.geotools.tile_client", but searching that in the repository gets zero hits (so I assume the geotools modules are not handled via config files?).
The geotools Javadoc is unfortunately also not helpful, as geotools is not yet using named modules.
https://docs.geotools.org/stable/userguide/tutorial/quickstart/java11.html mentioned using the same requires as the ones declared in my POM, but for my project requireing (gt-shapefile, gt-swing, gt-tile-client, gt-epsg-hsql, gt-grid) this resulted in the error:
The project was not built since its build path is incomplete. Cannot find the class file for org.opengis.referencing.crs.CoordinateReferenceSystem. Fix the build path then try building this project
Through digging down through the maven dependencies, I found a few more which I now explicitely require too. This brought me past a few more errors.
requires org.geotools.opengis;
requires org.geotools.referencing;
requires org.geotools.coverage;
requires org.geotools.main;
requires org.geotools.render;
requires org.geotools.epsg_hsql;
requires org.geotools.shapefile;
requires org.geotools.grid;
requires org.geotools.tile_client;
requires org.geotools.swing;
requires org.geotools.http;
However, I did find a module which doesnt seem to want to work (gt-cql, dependency of gt-render). requires org.geotools.cql cannot be resolved.
So, as asked at the top, how do I discover the correct Java 11 module names for my GeoTools project? And is there a specific hint as to which module I should require in order to get rid of the org.locationtech.jts.geom.Envelope problem?