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

Make easier for users to point to their geonetwork application #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

amrtn
Copy link

@amrtn amrtn commented Jul 29, 2020

I've spent some time wondering why this script didn't work for me and then I realized the GEONETWORK_HOME was set inside gemet-to-simpleskos.sh to a path different to my geonetwork installation.

If a new user executes the suggested command ./gemet-to-simpleskos.sh en fr de nl it without updating the value of GEONETWORK_HOME inside gemet-to-simpleskos.sh it will fail with a confusing error:

Creating thesaurus ...
Error: Could not find or load main class net.sf.saxon.Transform

This happens because the CLASSPATH for the java call should contain $GEONETWORK_HOME/WEB-INF/lib/saxon-9.1.0.8b-patch.jar and the GEONETWORK_HOME is set inside gemet-to-simpleskos.sh to a default path. If geonetwork is not present at that path the script will fail.

A better approach is make the user set the GEONETWORK_HOME variable before calling the script.

I also added a check to warn the user if the script could not locate the saxon jar. In this case it will print an error message and exit with an error code.

If a new user executes the suggested command
`./gemet-to-simpleskos.sh en fr de nl it` without updating the value of
`GEONETWORK_HOME` inside `gemet-to-simpleskos.sh` it will fail with a
confusing error:

```bash
Creating thesaurus ...
Error: Could not find or load main class net.sf.saxon.Transform
```

This happens because the CLASSPATH for the java call should contain
`$GEONETWORK_HOME/WEB-INF/lib/saxon-9.1.0.8b-patch.jar` and the
`GEONETWORK_HOME` is set inside `gemet-to-simpleskos.sh` to a default
path. If geonetwork is not present at that path the script will fail.

A better approach is make the user set the `GEONETWORK_HOME` variable
before calling the script.

I also added a check to warn the user if the script could not locate
the saxon jar. In this case it will print an error message and exit
with an error code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant