Skip to content

Commit

Permalink
Documentation 4.4: Update Java references to Java 11, update link to …
Browse files Browse the repository at this point in the history
…the manual and release scripts (geonetwork#7378)

* Update Java references to Java 11 and update link to the manual

* Update release scripts to remove Sphinx docs updates and fix SQL migration script folder name

* Add Tomcat / Jetty versions and JAVA_OPTS configuration for metrics endpoint
  • Loading branch information
josegar74 authored Oct 3, 2023
1 parent ca85e1f commit 2b82962
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 40 deletions.
2 changes: 1 addition & 1 deletion docs/manual/docs/help/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ GeoNetwork is a catalog application to manage spatially referenced resources. It

!!! info "Reference"

[GeoNetwork Manual](https://geonetwork-opensource.org/manuals/4.0.x/en/#)
[GeoNetwork Manual](https://docs.geonetwork-opensource.org/4.4)

[GeoNetwork opensource](http://geonetwork-opensource.org)
6 changes: 3 additions & 3 deletions docs/manual/docs/install-guide/index.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Installation guide {#installation}

!!! info "Version Added"
!!! info

3.2
GeoNetwork 4.4 requires a Java 11 environment (JRE) to be installed on your system. Later versions of Java will not work at present. This must be done prior to installation.

**Important: GeoNetwork requires a Java 8 environment (JRE) to be installed on your system. Later versions of Java will not work at present. This must be done prior to installation.**
Prior versions of GeoNetwork require a Java 8 environment (JRE) to be installed on your system.

Before you can use GeoNetwork on your own computer, you need to install it. There are several different ways to install GeoNetwork:

Expand Down
19 changes: 7 additions & 12 deletions docs/manual/docs/install-guide/installing-from-source-code.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,15 @@

## System Requirements

### Java 8
### Java 11

GeoNetwork is a Java 8 application that runs as a servlet, which means that a Java Development Kit (JDK) must be installed in order to build and run it. You can get a Java 8 JDK from your Linux distribution, [Oracle OpenJDK](http://openjdk.java.net/) or [AdoptOpenJDK](https://adoptopenjdk.net). Please note that the Java 8 [Oracle JDK](http://www.oracle.com/technetwork/java/javase/downloads) is currently only being distributed for testing purposes.
GeoNetwork 4.4 is a Java 11 application that runs as a servlet, which means that a Java Development Kit (JDK) must be installed in order to build and run it. You can get a Java 11 JDK from your Linux distribution, [Oracle OpenJDK](http://openjdk.java.net/) or [AdoptOpenJDK](https://adoptopenjdk.net). Please note that the Java 11 [Oracle JDK](http://www.oracle.com/technetwork/java/javase/downloads) is currently only being distributed for testing purposes.

Because GeoNetwork is developed with Java 8 (LTS), this has the following implications:
Because GeoNetwork is developed with Java 11 (LTS), it won't run at all with earlier releases.

- GeoNetwork should not be developed with newer versions of Java.
- Java 11 (LTS) is **not supported** at this time.
- GeoNetwork won't run at all with Java 7 (1.6) or earlier releases.


!!! Note

GeoNetwork 4.4.0 is scheduled to support Java 11
- GeoNetwork should not be developed with newer versions of Java.
- It won't run at all with earlier releases.
- Java 17 (LTS) is **not supported** at this time.

### Application Server

Expand Down Expand Up @@ -49,7 +44,7 @@ The software runs in different ways depending on the servlet container you are u

The following tools are required to be installed to setup a development environment for GeoNetwork:

- **Java 8** - Developing with GeoNetwork requires Java Development Kit (JDK) 1.8.
- **Java 11** - Developing with GeoNetwork requires Java Development Kit (JDK) 11.
- **Maven** 3.1.0+ - GeoNetwork uses [Maven](http://maven.apache.org/) to manage the build process and the dependencies. Once is installed, you should have the mvn command in your path (on Windows systems, you have to open a shell to check).
- **Git** - GeoNetwork source code is stored and versioned in [a Git repository on Github](https://github.com/geonetwork/core-geonetwork). Depending on your operating system a variety of Git clients are available. Please check the Git website for some [alternatives](http://git-scm.com/downloads/guis) and good [documentation](http://git-scm.com/documentation). More documentation can be found on the [Github website](https://help.github.com/).
- **Ant** - GeoNetwork uses [Ant](http://ant.apache.org/) to build the installer. Version 1.6.5 works but any other recent version should be OK. Once installed, you should have the Ant command in your path (on Windows systems, you have to open a shell to check).
Expand Down
7 changes: 7 additions & 0 deletions docs/manual/docs/install-guide/installing-from-war-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ Host ports requirements:
- [Kibana](https://www.elastic.co/kibana/): 5601
- Database eg. 5432 for a default [PostgreSQL](https://www.postgresql.org/) installation


For [Apache Tomcat](http://tomcat.apache.org/) we recommend the following versions: 8.5.x and 9.0.x.
For [Jetty](https://www.eclipse.org/jetty/) we the following versions: 9.4.x.

1. Download the WAR file

GeoNetwork releases are available in <https://sourceforge.net/projects/geonetwork/files/GeoNetwork_opensource/>
Expand All @@ -37,6 +41,9 @@ Host ports requirements:

You need to ensure Tomcat is configured with enough memory for GeoNetwork to launch. This can be be configured via the `setenv` script in tomcat with the appropriate memory for the JAVA_OPTS property). `-Xms2g -Xmx2g` is usually fine.

!!! note

For the `/monitor/metrics` endpoint to work correctly, you must add to `JAVA_OPTS` the following option: `--add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED`

4. Configure the search platform

Expand Down
2 changes: 1 addition & 1 deletion docs/manual/docs/maintainer-guide/production-use/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ GeoNetwork may run out of database connections, especially if a catalogue is set

## Java container

GeoNetwork requires Java 8. The Oracle JRE version 8 is reaching end-of-live, we suggest to use the [openJDK](https://adoptopenjdk.net).
GeoNetwork 4.4 requires Java 11. The Oracle JRE version 8 is reaching end-of-live, we suggest to use the [openJDK](https://adoptopenjdk.net).

GeoNetwork arrives with a default container called Jetty. Jetty is a powerful minimal container implementation. If you need more configuration options consider to use Tomcat. Other containers can be used, but there are not many user experiences. Read more at [Installing from WAR file](../../install-guide/installing-from-war-file.md)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ In this paragraph some guidance will be provided to build GeoNetwork from source

The source code of GeoNetwork is available at [Github](https://github.com/geonetwork/core-geonetwork). This means that you can clone, fork and propose pushes of your custom changes. If you are not familiar with repositories of code or git, you should check [this quick manual](https://try.github.io/levels/1/challenges/1).

GeoNetwork is a java project using [Maven version 3+](https://Maven.apache.org/). It is written on **Java 8**. It works both with OpenJDK or the Oracle version. There are several ways to install this on your local machine; for example if you have a Debian based OS (like Ubuntu), you can install them with just this command:
GeoNetwork 4.4 is a java project using [Maven version 3+](https://Maven.apache.org/). It is written on **Java 11**. It works both with OpenJDK or the Oracle version. There are several ways to install this on your local machine; for example if you have a Debian based OS (like Ubuntu), you can install them with just this command:

``` bash
$ sudo apt-get install maven git
Expand Down
10 changes: 2 additions & 8 deletions update-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,6 @@ echo

# TODO: check that version is the version in the file to be updated.

# Update version in sphinx doc files
echo 'Documentation'
echo ' * updating docs/manuals/source/conf.py'
sed $sedopt "s/${version}/${new_version_main}/g" docs/manuals/source/conf.py
echo

# Update release properties
echo 'Release (ZIP bundle)'
echo ' * updating release/build.properties'
Expand All @@ -112,8 +106,8 @@ echo 'SQL script'
sed $sedopt "s/'system\/platform\/version', '.*', 0/'system\/platform\/version', '${new_version_main}', 0/g" web/src/main/webapp/WEB-INF/classes/setup/sql/data/data-db-default.sql
sed $sedopt "s/'system\/platform\/subVersion', '.*', 0/'system\/platform\/subVersion', '${sub_version}', 0/g" web/src/main/webapp/WEB-INF/classes/setup/sql/data/data-db-default.sql

find . -wholename *v${version//[.]/}/migrate-default.sql -exec sed $sedopt "s/value='${version}' WHERE name='system\/platform\/version'/value='${new_version_main}' WHERE name='system\/platform\/version'/g" {} \;
find . -wholename *v${version//[.]/}/migrate-default.sql -exec sed $sedopt "s/value='.*' WHERE name='system\/platform\/subVersion'/value='${sub_version}' WHERE name='system\/platform\/subVersion'/g" {} \;
find . -wholename *v${new_version_main_nopoint//[.]/}/migrate-default.sql -exec sed $sedopt "s/value='${version}' WHERE name='system\/platform\/version'/value='${new_version_main}' WHERE name='system\/platform\/version'/g" {} \;
find . -wholename *v${new_version_main_nopoint//[.]/}/migrate-default.sql -exec sed $sedopt "s/value='.*' WHERE name='system\/platform\/subVersion'/value='${sub_version}' WHERE name='system\/platform\/subVersion'/g" {} \;

# Update version pom files
mvn versions:set-property -Dproperty=gn.project.version -DnewVersion=${new_version}
Expand Down
13 changes: 5 additions & 8 deletions updateBranchVersions.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#!/bin/bash

# Usage to update branch from a release 2.6.2 version to 2.6.3-SNAPSHOT version
# Usage to update branch from a release 2.6.2 version to 2.6.3-SNAPSHOT version
# In root folder of branch code: ./updateBranchVersion.sh 2.6.2 2.6.3

function showUsage
function showUsage
{
echo -e "\nThis script is used to update branch from a release version to next SNAPSHOT version. Should be used in branch after creating a new release (tag)."
echo -e "\nThis script is used to update branch from a release version to next SNAPSHOT version. Should be used in branch after creating a new release (tag)."
echo
echo -e "Usage: ./`basename $0 $1` actual_version next_version"
echo
Expand All @@ -14,7 +14,7 @@ function showUsage
echo
}

if [ "$1" = "-h" ]
if [ "$1" = "-h" ]
then
showUsage
exit
Expand Down Expand Up @@ -58,16 +58,13 @@ else
fi

echo
echo 'Your Operating System is' $OSTYPE
echo 'Your Operating System is' $OSTYPE
echo 'sed will use the following option: ' $sedopt
echo

version="$1"
new_version="$2"

# Update version in sphinx doc files
sed $sedopt "s/${version}/${new_version}-SNAPSHOT/g" docs/manuals/source/conf.py

# Update release properties
sed $sedopt "s/version=${version}/version=${new_version}/g" release/build.properties
sed $sedopt "s/subVersion=0/subVersion=SNAPSHOT/g" release/build.properties
Expand Down
9 changes: 3 additions & 6 deletions updateReleaseVersions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

function showUsage
{
echo -e "\nThis script is used to update branch from a SNAPSHOT version to a release version. Should be used in branch before creating a new release (tag)."
echo -e "\nThis script is used to update branch from a SNAPSHOT version to a release version. Should be used in branch before creating a new release (tag)."
echo
echo -e "Usage: `basename $0 $1` version"
echo
Expand All @@ -14,7 +14,7 @@ function showUsage
echo
}

if [ "$1" = "-h" ]
if [ "$1" = "-h" ]
then
showUsage
exit
Expand Down Expand Up @@ -45,15 +45,12 @@ else
fi

echo
echo 'Your Operating System is' $OSTYPE
echo 'Your Operating System is' $OSTYPE
echo 'sed will use the following option: ' $sedopt
echo

version="$1"

# Update version in sphinx doc files
sed $sedopt "s/${version}-SNAPSHOT/${version}/g" docs/manuals/source/conf.py

# Update release subversion
sed $sedopt "s/subVersion=SNAPSHOT/subVersion=0/g" release/build.properties

Expand Down

0 comments on commit 2b82962

Please sign in to comment.