I need to generate a schema plugin for an ISO19115-3 profile, GeoNetwork 4.2.6-SNAPSHOT, building from source, so I want to have the plugin in the source code. I tried setting it up following instructions at https://geonetwork-opensource.org/manuals/4.0.x/en/customizing-application/implementing-a-schema-plugin.html.

I copied the core-geonetwork\schemas\iso19115-3.2018 directory to core-geonetwork\schemas and renamed to iso19115-3.DDE, and added what seems to be the appropriate registrations in geonetwork\schemas\pom.xml, and web/pom.xml. I also went through schemas\iso19115-3.DDE folder and replaced .2018 with .DDE where it seemed appropriate.

Tried mvn process resources and got this error:

[WARNING] The POM for org.geonetwork-opensource.schemas:gn-schema-iso19115-
3.DDE:zip:4.2.6-SNAPSHOT is missing, no dependency information available
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-
plugin:3.1.2:unpack (unpack-schemas) on project gn-web-app: Unable to find/resolve artifact.: 
The following artifacts could not be resolved: org.geonetwork-opensource.schemas:gn-
schema-iso19115-3.DDE:zip:4.2.6-SNAPSHOT (absent): Could not find artifact 
org.geonetwork-opensource.schemas:gn-schema-iso19115-3.DDE:zip:4.2.6-SNAPSHOT in 
osgeo-snapshot (https://repo.osgeo.org/repository/snapshot/)

It looks like mvn process-resources is trying to download stuff from **https://repo.osgeo.org/repository/snapshot/org/geonetwork-opensource/schemas/**gn-schema-iso19115-3.DDE/4.2.6-SNAPSHOT/, but of course there's nothing there. Looks for maven-metadata.xml, then a pom, then a zip... and fails.

My reading of the pom.xml in my new schema directory is that is should create the .zip file in my local file system.

Any suggestions on how to get the build to work with the cloned schema plugin?

  • Maybe you could take a look at iso19139.ca.HNAP metadata schema and check how it's done there.
    – juanluisrp
    Aug 29, 2023 at 8:58
  • @juanluisrp that profile is based on Geonetwork 3.1.2. Would the same procedure work with GN 4.2.6, or am I better off using the ISO19115-3.2018 profile in metadata101 and GN 3.1.2?
    – smrTucson
    Aug 29, 2023 at 15:21
  • There is a 4.2.x branch too.
    – juanluisrp
    Aug 30, 2023 at 10:18
  • I removed the gn-schema-iso19115-3.DDE-4.2.6-SNAPSHOTj.jar, ....zip, and ...-tests.jar and ran a full build (mvn package install -DskipTests), and the build was successful this time. The build took 13 hours-- is that normal? Is there some way to speed it up? (WSL Ubuntu 22 on Windows 11).
    – smrTucson
    Aug 30, 2023 at 15:24
  • No, that isn't normal. Maybe you could try to exclude your sources directory from anti-virus analysis/windows defender.
    – juanluisrp
    Sep 8, 2023 at 11:40


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.