-
-
Notifications
You must be signed in to change notification settings - Fork 489
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Backport 4.2.x] Move datastorage providers to maven modules and incl…
…ude them in the build on demand. Backport #7302
- Loading branch information
Showing
40 changed files
with
1,204 additions
and
47 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Data storage | ||
|
||
Extensions for data storage (used for storage resources such as record attachments and thumbnails). | ||
|
||
Core provides the default implementation for a data directory: | ||
|
||
* org.fao.geonet.resource.FileResources | ||
|
||
For more information see: | ||
|
||
* org.fao.geonet.resource.Resources | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# CMIS Data storage | ||
|
||
Extension for data storage (used for storage resources such as record attachments and thumbnails). | ||
|
||
* cmis: content management interoperability services | ||
|
||
This data storage is based on the Apache Chemistry project which has been retired. | ||
|
||
Reference: | ||
|
||
* https://chemistry.apache.org/java/opencmis.html |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,208 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
~ Copyright (C) 2001-2023 Food and Agriculture Organization of the | ||
~ United Nations (FAO-UN), United Nations World Food Programme (WFP) | ||
~ and United Nations Environment Programme (UNEP) | ||
~ | ||
~ This program is free software; you can redistribute it and/or modify | ||
~ it under the terms of the GNU General Public License as published by | ||
~ the Free Software Foundation; either version 2 of the License, or (at | ||
~ your option) any later version. | ||
~ | ||
~ This program is distributed in the hope that it will be useful, but | ||
~ WITHOUT ANY WARRANTY; without even the implied warranty of | ||
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
~ General Public License for more details. | ||
~ | ||
~ You should have received a copy of the GNU General Public License | ||
~ along with this program; if not, write to the Free Software | ||
~ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA | ||
~ | ||
~ Contact: Jeroen Ticheler - FAO - Viale delle Terme di Caracalla 2, | ||
~ Rome - Italy. email: [email protected] | ||
--> | ||
|
||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<parent> | ||
<artifactId>gn-datastorages</artifactId> | ||
<groupId>org.geonetwork-opensource.datastorage</groupId> | ||
<version>4.2.12-SNAPSHOT</version> | ||
</parent> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<artifactId>gn-datastorage-cmis</artifactId> | ||
<name>CMIS datastorage</name> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.geonetwork-opensource</groupId> | ||
<artifactId>gn-core</artifactId> | ||
<version>${project.version}</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.springframework</groupId> | ||
<artifactId>spring-context</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.springframework</groupId> | ||
<artifactId>spring-context-support</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.apache.chemistry.opencmis</groupId> | ||
<artifactId>chemistry-opencmis-client-api</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.apache.chemistry.opencmis</groupId> | ||
<artifactId>chemistry-opencmis-client-impl</artifactId> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<artifactId>maven-jar-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>test-jar</id> | ||
<goals> | ||
<goal>test-jar</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
<resources> | ||
<resource> | ||
<directory>src/main/resources</directory> | ||
<filtering>true</filtering> | ||
</resource> | ||
</resources> | ||
</build> | ||
|
||
<profiles> | ||
<profile> | ||
<id>run-static-analysis</id> | ||
<activation> | ||
<property> | ||
<name>!skipTests</name> | ||
</property> | ||
</activation> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>findbugs-maven-plugin</artifactId> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</profile> | ||
<!-- Profile to release datastorage bundle --> | ||
<profile> | ||
<id>release</id> | ||
<activation> | ||
<property> | ||
<!-- include when making a release --> | ||
<name>release</name> | ||
</property> | ||
</activation> | ||
<build> | ||
<plugins> | ||
<!-- stage jars for assembly --> | ||
<plugin> | ||
<artifactId>maven-dependency-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>stage-libs</id> | ||
<phase>prepare-package</phase> | ||
<goals> | ||
<goal>copy-dependencies</goal> | ||
</goals> | ||
<!-- libs to include are managed here rather than in assembly --> | ||
<configuration> | ||
<silent>true</silent> | ||
<includeScope>runtime</includeScope> | ||
<excludeScope>provided</excludeScope> | ||
<excludeGroupIds>com.google.code.findbugs</excludeGroupIds> | ||
<excludeTransitive>false</excludeTransitive> | ||
<outputDirectory>${project.build.directory}/lib</outputDirectory> | ||
<overWriteReleases>false</overWriteReleases> | ||
<overWriteSnapshots>true</overWriteSnapshots> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<!-- generate html conrtents--> | ||
<plugin> | ||
<groupId>com.ruleoftech</groupId> | ||
<artifactId>markdown-page-generator-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>readme</id> | ||
<phase>process-resources</phase> | ||
<goals> | ||
<goal>generate</goal> | ||
</goals> | ||
<configuration> | ||
<inputDirectory>${project.basedir}/src/main/assembly</inputDirectory> | ||
<outputDirectory>${project.build.directory}/html</outputDirectory> | ||
</configuration> | ||
</execution> | ||
<execution> | ||
<id>licenses</id> | ||
<phase>process-resources</phase> | ||
<goals> | ||
<goal>generate</goal> | ||
</goals> | ||
<configuration> | ||
<inputDirectory>${project.basedir}/../../</inputDirectory> | ||
<outputDirectory>${project.build.directory}/html/license</outputDirectory> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
<configuration> | ||
<recursiveInput>false</recursiveInput> | ||
<transformRelativeMarkdownLinks>true</transformRelativeMarkdownLinks> | ||
<headerHtmlFile>${project.basedir}/../../release/src/markdown/html/header.html</headerHtmlFile> | ||
<footerHtmlFile>${project.basedir}/../../release/src/markdown/html/footer.html</footerHtmlFile> | ||
<pegdownExtensions>TABLES,FENCED_CODE_BLOCKS</pegdownExtensions> | ||
<defaultTitle>true</defaultTitle> | ||
</configuration> | ||
</plugin> | ||
<!-- assemble into zip for release --> | ||
<plugin> | ||
<artifactId>maven-assembly-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>release-zip</id> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>single</goal> | ||
</goals> | ||
<configuration> | ||
<finalName>${project.artifactId}-${project.version}</finalName> | ||
<appendAssemblyId>false</appendAssemblyId> | ||
<descriptors> | ||
<descriptor>src/main/assembly/assembly.xml</descriptor> | ||
</descriptors> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</profile> | ||
</profiles> | ||
|
||
<properties> | ||
<rootProjectDir>${basedir}/..</rootProjectDir> | ||
</properties> | ||
</project> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# CMIS data storage provider library | ||
|
||
To install the CMIS data storage provider in GeoNetwork: | ||
|
||
1. Copy the `lib` folder jar files into to `{GEONETWORK_DIR}/WEB-INF/lib` folder. | ||
|
||
2. Define the following environmental variables: | ||
|
||
- Use CMIS data storage provider: | ||
|
||
```bash | ||
export GEONETWORK_STORE_TYPE=cmis | ||
``` | ||
|
||
- Setup CMIS connection (check with your setup): | ||
|
||
```bash | ||
export CMIS_REPOSITORY_ID=-default- | ||
export CMIS_USERNAME=username | ||
export CMIS_PASSWORD=password | ||
export CMIS_SERVICES_BASE_URL=http://localhost:8080/alfresco | ||
export CMIS_BASE_REPOSITORY_PATH=geonetwork | ||
export CMIS_BINDING_TYPE=browser | ||
export CMIS_BROWSER_URL=/api/-default-/public/cmis/versions/1.1/browser | ||
``` | ||
|
||
3. Start GeoNetwork |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd"> | ||
<id>bin</id> | ||
<formats> | ||
<format>zip</format> | ||
</formats> | ||
<fileSets> | ||
<fileSet> | ||
<directory>${project.build.directory}/lib</directory> | ||
<outputDirectory>/lib</outputDirectory> | ||
</fileSet> | ||
</fileSets> | ||
|
||
<files> | ||
<file> | ||
<source>${project.build.directory}/${project.artifactId}-${project.version}.jar</source> | ||
<outputDirectory>/lib</outputDirectory> | ||
</file> | ||
|
||
<file> | ||
<source>${project.build.directory}/html/README.html</source> | ||
<outputDirectory>/</outputDirectory> | ||
</file> | ||
|
||
<file> | ||
<source>${project.build.directory}/html/license/LICENSE.html</source> | ||
<outputDirectory>/license</outputDirectory> | ||
</file> | ||
</files> | ||
</assembly> |
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
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.