The external model is automatically generated by using the internal sources, performing some text search/replace operations and building it.
This brings two issues:
you have to pay attention to which model you are importing in your module.
you cannot mix the two modules, because they contain the very same class names and may cause issue with the classloaders. This brings another problem:
the embedded geoserver-geofence modules are mutually exclusive:
gs-geofence (the client module, which needs an externally running geofence webapp) only needs the external model.
gs-geofence-server (the module which runs an embedded geofence engine in geoserver) needs the internal model (it needs to persist the geofence data), and also has a dependecy vs gs-geofence for the accessmanager logic. It means that gs-geofence-server shall have a maven exclusion on the external model module; furthermore, running geoserver with both the gs-geofence and gs-geofence-server defined expicitly will import both models and won't run properly.
A solutions to this problem is removing the hibernate annotations and add the related .hbm files in the gf-persistence module.
This issue in particular prevents developing GeoServer + GeoFence using Eclipse the "normal" way, with Start.java, one has to use mvn jetty:run with the right command line options instead
GeoFence at the moment has two different modules for the model:
The external model is automatically generated by using the internal sources, performing some text search/replace operations and building it.
This brings two issues:
gs-geofence
(the client module, which needs an externally running geofence webapp) only needs the external model.gs-geofence-server
(the module which runs an embedded geofence engine in geoserver) needs the internal model (it needs to persist the geofence data), and also has a dependecy vs gs-geofence for the accessmanager logic. It means thatgs-geofence-server
shall have a mavenexclusion
on the external model module; furthermore, running geoserver with both the gs-geofence and gs-geofence-server defined expicitly will import both models and won't run properly.A solutions to this problem is removing the hibernate annotations and add the related
.hbm
files in thegf-persistence
module.