Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove org.reflections dependency [3.6] #1642

Merged

Conversation

stephanr
Copy link
Member

@stephanr stephanr commented Feb 6, 2024

Remove org.reflections dependency and replace related logic with Java ServiceLoader implementations.

As part of this work, some old Toolbox tools were modified to include a public constructor.

Toolboxes smoke tests

❯ java -showversion
openjdk version "17.0.9" 2023-10-17
OpenJDK Runtime Environment Temurin-17.0.9+9 (build 17.0.9+9)

❯ t-3d-3.6.0\bin\d3toolbox-3d.bat
   _
 _| | ___  ___  ___  _ _  ___  ___  3
/ . |/ ._>/ ._>/ . || '_>/ ._>/ ._>
\___|\___.\___.\_. ||_|  \___.\___.
               <___'

Available tools, start with 'd3toolbox <tool> <args>' or omit the args to see all available parameters of the tool:

   DEMRasterFilterer       Applies a filter to a dem, which is loaded from a
                           raster.
   InteractiveWPVS         Reads in a configuration document for the deegree
                           WPVS and allows the user to interactively navigate
                           through the scene.
   DataManager             The DataManager inserts, updates and deletes
                           3d-objects in/from the WPVS backend
   DEMDatasetGenerator     Generates DEM multiresolution datasets from rasters,
                           suitable for the WPVS.
   PrototypeAssigner       Interface to the WPVS backend for assigning
                           prototypes to QualityLevel in a world object model.
   ModelGeneralizor        Generates a generalization of a building by
                           projecting the boundaries on a 2d plane and
                           calculating a convex hull from them.

❯ .\t-3b-3.6.0\bin\d3toolbox.bat
   _
 _| | ___  ___  ___  _ _  ___  ___  3
/ . |/ ._>/ ._>/ . || '_>/ ._>/ ._>
\___|\___.\___.\_. ||_|  \___.\___.
               <___'

Available tools, start with 'd3toolbox <tool> <args>' or omit the args to see all available parameters of the tool:

   ScanEncoding                scans the argument files and tries to guess their
                               encoding, treats dbf files specially
   CRSInfo                     Retrieve information about the
                               availability|definition of a certain crs in
                               deegree
   PostgreSQLImporter          This tool can be used to import SLD/SE files into
                               a WMS styles database.
   SchemaAnalyzer              Prints an analysis of the global element
                               declarations in an XML schema and their content
                               models.
   GMLSchemaAnalyzer           Prints an analysis of the feature type hierarchy
                               defined in a GML application schema as well as
                               information on the geometry element hierarchy.
   TransformRaster             Transforms a raster with the given crs into
                               another crs
   StyleChecker                This tool can be used to check and remove faulty
                               styles in a WMS style database (PostgreSQL).
   RasterConverter             Converts a raster from one type into another.
   ConfigurationConverger      Export the CoordinateSystems from a given Input
                               format to a given Output format and place the
                               result into an output File.
   FeatureTypesToLayerTree     generates a WMS layer tree/configuration file
                               from a feature type hierarchy
   RasterTreeGridifier         Converts a deegree 2 raster tree into a grid of
                               regular, non-overlapping raster cells encoded as
                               raw RGB blobs, suitable for the WPVS.
   EPSGDBSynchronizer          Connects to the EPSG database at
                               //hurricane/epsg, and for all projections (other
                               objects to be added!) that have no CRS codetype
                               in the CRS database, the codes are fetched from
                               the EPSG database.
   ApplicationSchemaTool       Swiss Army knife for GML/deegree application
                               schemas.
   MappingShortener            Helps creating readable short versions of feature
                               type / property names for mapping to db.
   RTBClient                   Builds a raster tree from a given set of rasters.
   CoordinateTransform         Convert a point or a list of points from one SRS
                               to another.
   Harvester                   harvest metadata records and insert them in a CSW
   XMLCoordinateTransform      Converts the GML geometries inside an XML
                               document from one SRS to another.
   FeatureStoreLoader          Imports feature datasets into a feature store
   ISO19139Validator           Validates single metadata records or metadata
                               records from directory against the ISO Schema.

❯ .\t-mig-3.6.0\bin\d3toolbox-migration.bat
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
   _
 _| | ___  ___  ___  _ _  ___  ___  3
/ . |/ ._>/ ._>/ . || '_>/ ._>/ ._>
\___|\___.\___.\_. ||_|  \___.\___.
               <___'

Available tools, start with 'd3toolbox <tool> <args>' or omit the args to see all available parameters of the tool:

   WMSMigrator     Converts a 3.1 or earlier WMS configuration to 3.2 style
                   configurations. Currently only works for feature layers.

# Manually added Alkis jar:

   BackReferenceFixer     adds inversDientZurDarstellungVon properties for
                          GeoInfoDok 6.0.1 files

Closes #1638
Fixes #1624

Relations:

* create ModuleInfoProvider
* implement ToolBox registration via Java Service Loader
+ add pulic constructor when needed
- remove org.reflections from pom.xml
- remove deprecation from Tool annotation
@stephanr stephanr added enhancement enhancement or improvement in progress core deegree core modules ready and removed in progress labels Feb 6, 2024
@stephanr stephanr added this to the 3.6 milestone Feb 7, 2024
@copierrj copierrj merged commit ca5bd6b into deegree:main Feb 7, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core deegree core modules enhancement enhancement or improvement ready
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reflections not longer maintained, needs to be removed or replaced
2 participants