Skip to content

Commit c797685

Browse files
authored
Merge pull request #16 from gdcc/12-exporters-parent
Migrate project to distribution of Parent POM
2 parents 02259e7 + ae45feb commit c797685

13 files changed

Lines changed: 966 additions & 79 deletions

File tree

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Project Inclusion
2+
description: Request including a metadata exporter plugin.
3+
title: "[Include]: "
4+
labels: ["inclusion"]
5+
assignees:
6+
- poikilotherm
7+
- pdurbin
8+
- qqmyers
9+
10+
body:
11+
- type: markdown
12+
attributes:
13+
value: |
14+
Thanks for considering adding a metadata exporter plugin!
15+
- type: textarea
16+
id: description
17+
attributes:
18+
label: What kind of exporter do you want to include?
19+
description: Please describe your exporter, its features and limitations
20+
placeholder: What does it do?
21+
value: "My exporter plugin does ..."
22+
validations:
23+
required: true
24+
- type: input
25+
id: format
26+
attributes:
27+
label: Target Export Data Format/s
28+
description: What kind of data format/s is exported with your plugin?
29+
placeholder: ex. JSON, JSON-LD, XML, PDF, ...
30+
validations:
31+
required: true
32+
- type: input
33+
id: source
34+
attributes:
35+
label: Source link
36+
description: Where does your exporter plugin currently reside? (Some public repository please)
37+
placeholder: ex. https://github.com/..., https://gitlab.com/..., or other
38+
validations:
39+
required: true
40+
- type: input
41+
id: download
42+
attributes:
43+
label: Download link
44+
description: Where can people download versions of your plugin? (Skip if yes to transfer below)
45+
placeholder: ex. https://github.com/...
46+
validations:
47+
required: false
48+
- type: dropdown
49+
id: donate
50+
attributes:
51+
label: Move to GDCC
52+
description: Would you like to request a transfer to the https://github.com/gdcc umbrella?
53+
options:
54+
- No
55+
- Yes
56+
default: 0
57+
validations:
58+
required: true
59+
- type: input
60+
id: contact
61+
attributes:
62+
label: Contact Details
63+
description: How can we get in touch with you if we need more info?
64+
placeholder: ex. email@example.com or Zulip nick
65+
validations:
66+
required: false

.github/workflows/build.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Build
2+
on:
3+
pull_request:
4+
5+
jobs:
6+
build:
7+
name: Build
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
- name: Determine Java version from POM
12+
run: |
13+
echo "JAVA_VERSION=$(grep '<jdk.version>' pom.xml | cut -f2 -d'>' | cut -f1 -d'<')" >> ${GITHUB_ENV}
14+
15+
- name: Set up JDK ${{ env.JAVA_VERSION }}
16+
uses: actions/setup-java@v4
17+
with:
18+
java-version: ${{ env.JAVA_VERSION }}
19+
distribution: 'temurin'
20+
cache: 'maven'
21+
22+
- name: Build, test, analyze
23+
run: mvn -B verify

.github/workflows/release.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Release to Maven Central Repository
2+
on:
3+
push:
4+
tags:
5+
- '*'
6+
7+
jobs:
8+
publish:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- name: Determine Java version from POM
13+
run: |
14+
echo "JAVA_VERSION=$(grep '<jdk.version>' pom.xml | cut -f2 -d'>' | cut -f1 -d'<')" >> ${GITHUB_ENV}
15+
16+
- name: Set up JDK ${{ env.JAVA_VERSION }}
17+
uses: actions/setup-java@v4
18+
with:
19+
java-version: ${{ env.JAVA_VERSION }}
20+
distribution: 'temurin'
21+
cache: 'maven'
22+
23+
# Running setup-java again overwrites the settings.xml - IT'S MANDATORY TO DO THIS SECOND SETUP!!!
24+
- name: Set up Maven Central Repository
25+
uses: actions/setup-java@v4
26+
with:
27+
java-version: ${{ env.JAVA_VERSION }}
28+
distribution: 'temurin'
29+
server-id: ossrh
30+
server-username: MAVEN_USERNAME
31+
server-password: MAVEN_PASSWORD
32+
gpg-private-key: ${{ secrets.DATAVERSEBOT_GPG_KEY }}
33+
gpg-passphrase: MAVEN_GPG_PASSPHRASE
34+
35+
- name: Sign + Publish release
36+
run: mvn -Prelease deploy -DskipUT -DskipIT
37+
env:
38+
MAVEN_USERNAME: ${{ secrets.DATAVERSEBOT_SONATYPE_USERNAME }}
39+
MAVEN_PASSWORD: ${{ secrets.DATAVERSEBOT_SONATYPE_TOKEN }}
40+
MAVEN_GPG_PASSPHRASE: ${{ secrets.DATAVERSEBOT_GPG_PASSWORD }}

.github/workflows/snapshot.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Snapshot to Maven Central Repository
2+
on:
3+
push:
4+
branches:
5+
- main
6+
7+
jobs:
8+
publish:
9+
runs-on: ubuntu-latest
10+
if: ${{ !contains(github.event.head_commit.message, '[maven-release-plugin]') }}
11+
steps:
12+
- uses: actions/checkout@v4
13+
- name: Determine Java version from POM
14+
run: |
15+
echo "JAVA_VERSION=$(grep '<jdk.version>' pom.xml | cut -f2 -d'>' | cut -f1 -d'<')" >> ${GITHUB_ENV}
16+
17+
- name: Set up JDK ${{ env.JAVA_VERSION }}
18+
uses: actions/setup-java@v4
19+
with:
20+
java-version: ${{ env.JAVA_VERSION }}
21+
distribution: 'temurin'
22+
cache: 'maven'
23+
server-id: ossrh
24+
server-username: MAVEN_USERNAME
25+
server-password: MAVEN_PASSWORD
26+
27+
- name: Build, test, verify and publish snapshot
28+
run: mvn -B verify
29+
- name: Publish snapshot
30+
run: mvn deploy -DskipUT -DskipIT
31+
env:
32+
MAVEN_USERNAME: ${{ secrets.DATAVERSEBOT_SONATYPE_USERNAME }}
33+
MAVEN_PASSWORD: ${{ secrets.DATAVERSEBOT_SONATYPE_TOKEN }}

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.idea
2+
3+
target
4+
.flattened-pom.xml

README.md

Lines changed: 71 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,75 @@
11
# Dataverse Exporters
2-
A collection of community-developed metadata exporters that conform to the [Dataverse](https://dataverse.org) exporter service provider interface (SPI) (1.0.0 first released with Dataverse 5.14, 2.0.0 released with Dataverse v6.0).
32

4-
Documentation of the exporter SPI is available under [Advanced Installation](https://guides.dataverse.org/en/latest/installation/advanced.html#installing-external-metadata-exporters) and [Metadata Export](https://guides.dataverse.org/en/latest/developers/metadataexport.html).
3+
A collection of community-developed metadata exporters that conform to the [Dataverse](https://dataverse.org) Exporter Service Provider Interface (SPI).
54

6-
As discussed in the guides you can download an example (for Dataverse 6.0+): [MyJSON exporter jar](https://github.com/gdcc/dataverse-exporters/raw/main/prebuilt-examples/dataverse-spi-export-examples-2.0.0.jar).
5+
Community members are encouraged to contribute to the documentation, add crosslinks, and create additional exporters!
6+
See below for more information.
77

8-
Community members are encouraged to contribute to the documentation, add crosslinks, and create additional exporters beyond the single simple example provided today.
8+
In this repository you will find the Parent POM for all exporters as well as a very simple example exporter (see `/example`).
9+
10+
## How to get support for exporters
11+
12+
All the projects below are made by the community for the community.
13+
While IQSS might contribute, please don't pester them with support request.
14+
15+
You are welcome to ask questions in the chat: https://chat.dataverse.org
16+
Please ask development related questions in #dev, anything else in #community or #troubleshoot.
17+
18+
In case of a concrete problem with one of the exporters, please create a reproducible issue in the respective GitHub project.
19+
20+
## List of known exporters
21+
22+
### Community supported GDCC projects
23+
24+
Quick links:
25+
- Explore a [list of GDCC exporter GitHub repositories](https://github.com/orgs/gdcc/repositories?q=props.topic%3A%22Metadata+Export%22).
26+
- Overview of [all GDCC exporters on Maven Central](https://central.sonatype.com/namespace/io.gdcc.export)
27+
28+
| Name/Source | Description | Format | Download |
29+
|---------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------|----------|
30+
| [Example](./example) | A minimalistic example, may be used as template | JSON | - |
31+
| [Debug](https://github.com/gdcc/exporter-debug) | Dumps all possible JSON and XML data available to export plugins | JSON, XML | TBD |
32+
| [DDI-PDF](https://github.com/gdcc/exporter-ddipdf) | Export DDI metadata as a printable PDF file | PDF with [DDI metadata](https://ddialliance.org/) | TBD |
33+
| [Croissant](https://github.com/gdcc/exporter-croissant) | Export metadata as linked data following [Croissant ontology](https://docs.mlcommons.org/croissant/docs/croissant-spec.html) | JSON-LD | TBD |
34+
| [RO-Crate](https://github.com/gdcc/exporter-ro-crate) | Export metadata as linked data following [RO-Crate ontology](https://www.researchobject.org/ro-crate/specification/1.1/appendix/jsonld.html) | JSON-LD | TBD |
35+
36+
### Other projects
37+
38+
If you have an exporter plugin that cannot or shall not be transferred to GDCC, feel free to open an issue or pull request to let us know.
39+
40+
## Creating new exporters
41+
42+
Documentation of the exporter SPI is available under [Advanced Installation](https://guides.dataverse.org/en/latest/installation/advanced.html#installing-external-metadata-exporters) and [Metadata Export](https://guides.dataverse.org/en/latest/developers/metadataexport.html).
43+
44+
### What are GDCC supported combinations of libraries and Dataverse?
45+
46+
Version support matrix:
47+
48+
| Supported | Exporter Parent POM | Dataverse SPI | Dataverse Software |
49+
|-----------|---------------------|---------------|--------------------|
50+
||| 1.0.0 | 5.14 |
51+
|| 2.0.0 | 2.0.0 | 6.0 - recent |
52+
53+
Other combinations might work. Your mileage may vary.
54+
55+
### How to contribute an exporter to the GDCC
56+
57+
In order to add your Dataverse Metadata Export Plugin to https://github.com/gdcc, please follow these steps:
58+
59+
- Use the parent POM provided in your build system
60+
- Add unit and integration tests for your exporter to validate functionality
61+
- Setup GitHub Actions to continuously verify functionality
62+
- Enable the Renovate Bot or Dependency Bot to update your dependencies regularly
63+
- Write documentation for your exporter. Especially make sure to indicate supported Dataverse software versions!
64+
- Open a contribution request at https://github.com/gdcc/dataverse-exporters/issues/new to get access to a repository, be included in the list above and enable releases.
65+
- Release your exporter on Maven Central. Credentials will be provided by GDCC admins. See below for more details.
66+
- Keep your exporter code well maintained. Keep a changelog.
67+
68+
Please note that abandoned projects can and will be archived to ensure smooth operations for admins/users.
69+
70+
### How to release an exporter in the name of GDCC
71+
72+
Once you received your exporter repository under https://github.com/gdcc, you can enable release workflows.
73+
Simply copy these files to your repository and ... (To Be Done)
74+
75+
Link to [Dataverse SPI](https://central.sonatype.com/artifact/io.gdcc/dataverse-spi)

dataverse-spi-export-examples/pom.xml

Lines changed: 0 additions & 63 deletions
This file was deleted.

example/pom.xml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
7+
<groupId>io.gdcc.export</groupId>
8+
<artifactId>helloworld</artifactId>
9+
<version>0.0.1-SNAPSHOT</version>
10+
<packaging>jar</packaging>
11+
12+
<name>Hello World Exporter</name>
13+
14+
<parent>
15+
<groupId>io.gdcc.export</groupId>
16+
<artifactId>parent</artifactId>
17+
<!-- In a real application, you should use a released version -->
18+
<version>1.0.0-M1-SNAPSHOT</version>
19+
<!-- In a real application, you would omit this -->
20+
<relativePath>../pom.xml</relativePath>
21+
</parent>
22+
23+
<!-- There is no <build> or <dependencies> section here because the Parent POM takes care of it for this rather simple example! -->
24+
</project>

dataverse-spi-export-examples/src/main/java/io/gdcc/spi/export/examples/MyJSONExporter.java renamed to example/src/main/java/io/gdcc/export/helloworld/HelloWorldExporter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
package io.gdcc.spi.export.examples;
2+
package io.gdcc.export.helloworld;
33

44
import com.google.auto.service.AutoService;
55
import io.gdcc.spi.export.ExportDataProvider;
@@ -24,7 +24,7 @@
2424
//This annotation makes the Exporter visible to Dataverse. How it works is well documented on the Internet.
2525
@AutoService(Exporter.class)
2626
//All Exporter implementations must implement this interface or the XMLExporter interface that extends it.
27-
public class MyJSONExporter implements Exporter {
27+
public class HelloWorldExporter implements Exporter {
2828

2929
// These methods provide information about the Exporter to Dataverse
3030

0 commit comments

Comments
 (0)