Created
October 31, 2017 10:16
-
-
Save archaeogeek/8de3554069248a0181e416de10c26e70 to your computer and use it in GitHub Desktop.
Geonetwork 3.2.x procedure
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## basic setup | |
git clone https://github.com/geonetwork/core-geonetwork.git core-geonetwork32 | |
cd core-geonetwork32 | |
git checkout 3.2.x | |
git submodule init | |
git submodule update | |
## cherry-pick fixes for ol3 | |
git cherry-pick 8d9db018535caf3331ac26dd0fb2af6bb9e2e3a8 | |
git cherry-pick 401d0efff2b3e01d5b961b8d5187fbd48d771eb9 | |
## add gemini 2.2 3.2.x branch | |
cd schemas | |
git submodule add -b 3.2.x https://github.com/AstunTechnology/iso19139.gemini22_GN3 iso19139.gemini22 | |
## modify various pom.xml files | |
## first, bump version number in gemini22 pom if necessary | |
cd iso19139.gemini22 | |
vi pom.xml | |
<version>3.2.1-SNAPSHOT</version> -> <version>3.2.3-SNAPSHOT</version> | |
## modify schemas pom.xml to include gemini22 | |
cd ../ | |
vi pom.xml | |
# insert | |
<module>iso19139.gemini22</module> | |
below | |
<module>iso19139</module> | |
## modify web pom.xml to include gemini22 | |
cd ../web | |
vi pom.xml | |
# insert the following: | |
<dependency> | |
<groupId>${project.groupId}</groupId> | |
<artifactId>schema-iso19139.gemini22</artifactId> | |
<version>${project.version}</version> | |
</dependency> | |
# directly below: | |
<dependency> | |
<groupId>${project.groupId}</groupId> | |
<artifactId>schema-iso19139</artifactId> | |
<version>${project.version}</version> | |
</dependency> | |
# insert the following: | |
<resource> | |
<directory>${project.basedir}/../schemas/iso19139.gemini22/src/main/plugin</directory> | |
<targetPath>${basedir}/src/main/webapp/WEB-INF/data/config/schema_plugins</targetPath> | |
</resource> | |
# directly below | |
<resource> | |
<directory>${project.basedir}/../schemas/iso19139/src/main/plugin</directory> | |
<targetPath>${basedir}/src/main/webapp/WEB-INF/data/config/schema_plugins</targetPath> | |
</resource> | |
# build this (note no scotgov stuff yet) | |
cd ../ | |
# build either with -Penv-Prod or -Penv-dev | |
mvn clean install -DskipTests -Penv-Prod | |
cd ./web | |
mvn jetty:run | |
# check localhost:8080/geonetwork | |
# or set port number | |
# mvn jetty:run -Djetty.port=9999 | |
# useful command if you get errors about addresses already being in use: | |
sudo fuser [port]/[protocol] | |
# If this is all working OK, create a new branch called scotgov to ensure we can roll back | |
git checkout -b scotgov | |
# Include change to recordview.html to display resource constraints as links by editing https://github.com/geonetwork/core-geonetwork/blob/3.2.x/web-ui/src/main/resources/catalog/views/default/templates/recordView.html#L221 to the following: | |
<p data-ng-repeat="c in mdView.current.record.resourceConstraints track by $index"><span data-gn-lynky="{{c}}" /></p> | |
## This works in default read-only view but not in advanced read-only view | |
# Include the following in form-builder.xsl by adding the following below https://github.com/geonetwork/core-geonetwork/blob/3.2.x/web/src/main/webapp/xslt/ui-metadata/form-builder.xsl#L752 | |
<!-- Astun additions to make use limitations work as either text or dropdown --> | |
<xsl:when test="$qualifiedName = 'gmd:useLimitation' and $schema='iso19139.gemini22'"> | |
<div class="btn-group"> | |
<button type="button" class="btn btn-default dropdown-toggle fa fa-plus gn-add" | |
data-toggle="dropdown" | |
title="{$i18n/addA} {$label}"> | |
<span/> | |
<span class="caret"/> | |
</button> | |
<ul class="dropdown-menu"> | |
<xsl:variable name="name" select="'gco:CharacterString'"/> | |
<xsl:variable name="label" select="gn-fn-metadata:getLabel($schema, $name, $labels)"/> | |
<li title="{$label/description}"> | |
<a | |
data-gn-click-and-spin="add({$parentEditInfo/@ref}, '{concat(@prefix, ':', @name)}', '{$id}', 'before');"> | |
<xsl:value-of select="$label/label"/> | |
</a> | |
</li> | |
<xsl:variable name="name2" select="'gmx:Anchor'"/> | |
<xsl:variable name="label2" select="gn-fn-metadata:getLabel($schema, $name2, $labels)"/> | |
<li title="{$label2/description}"> | |
<a | |
data-gn-click-and-spin="addChoice({$parentEditInfo/@ref}, '{$qualifiedName}', '{$name2}', '{$id}', 'replaceWith');"> | |
<xsl:value-of select="$label2/label"/> | |
</a> | |
</li> | |
</ul> | |
</div> | |
</xsl:when> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment