Skip to content

Commit cc5504e

Browse files
remove outdated ossrh references #11512 (#11917)
Also add additional namespaces we use and rewrite "adding new library" section, pointing at examples. Co-authored-by: Steven Winship <[email protected]>
1 parent 43e122f commit cc5504e

File tree

1 file changed

+10
-50
lines changed

1 file changed

+10
-50
lines changed

doc/sphinx-guides/source/developers/making-library-releases.rst

Lines changed: 10 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ Note: See :doc:`making-releases` for Dataverse itself.
1313
We release Java libraries to Maven Central that are used by Dataverse (and perhaps `other <https://github.com/gdcc/xoai/issues/141>`_ `software <https://github.com/gdcc/xoai/issues/170>`_!):
1414

1515
- https://central.sonatype.com/namespace/org.dataverse
16+
- https://central.sonatype.com/namespace/org.dataverse.test
1617
- https://central.sonatype.com/namespace/io.gdcc
18+
- https://central.sonatype.com/namespace/io.gdcc.export
1719

1820
We release JavaScript/TypeScript libraries to npm:
1921

@@ -109,60 +111,18 @@ Releasing a New Library to Maven Central
109111
At a high level:
110112

111113
- Start with a snapshot release.
112-
- Use an existing pom.xml as a starting point.
113-
- Use existing GitHub Actions workflows as a starting point.
114-
- Create secrets in the new library's GitHub repo used by the workflow.
115-
- If you need an entire new namespace, look at previous issues such as https://issues.sonatype.org/browse/OSSRH-94575 and https://issues.sonatype.org/browse/OSSRH-94577
116-
117-
Updating pom.xml for a Snapshot Release
118-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
119-
120-
Before publishing a final version to Maven Central, you should publish a snapshot release or two. For each snapshot release you publish, the jar name will be unique each time (e.g. ``foobar-0.0.1-20240430.175110-3.jar``), so you can safely publish over and over with the same version number.
121-
122-
We use the `Nexus Staging Maven Plugin <https://github.com/sonatype/nexus-maven-plugins/blob/main/staging/maven-plugin/README.md>`_ to push snapshot releases to https://s01.oss.sonatype.org/content/groups/staging/io/gdcc/ and https://s01.oss.sonatype.org/content/groups/staging/org/dataverse/
123-
124-
Add the following to your pom.xml:
125-
126-
.. code-block:: xml
114+
- Use an existing pom.xml as a starting point, such as from `Croissant <https://github.com/gdcc/exporter-croissant>`_, that inherits from the common Maven parent (https://github.com/gdcc/maven-parent). You can also play around with the "hello" project (https://github.com/gdcc/hello) and even make releases from it since it is designed to be a sandbox for publishing to Maven Central.
115+
- Use existing GitHub Actions workflows as a starting point, such as from `Croissant <https://github.com/gdcc/exporter-croissant>`_. As of this writing we have separate actions for ``maven-snapshot.yml`` and ``maven-release.yml``.
116+
- For repos under https://github.com/IQSS, create secrets in the new library's GitHub repo used by the workflow. This is necessary for the IQSS org because "organization secrets are not available for organizations on legacy per-repository billing plans." For repos under https://github.com/gdcc you can make use of shared secrets at the org level. These are the environment variables we use:
127117

128-
<version>0.0.1-SNAPSHOT</version>
118+
- DATAVERSEBOT_GPG_KEY
129119

130-
<distributionManagement>
131-
<snapshotRepository>
132-
<id>ossrh</id>
133-
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
134-
</snapshotRepository>
135-
<repository>
136-
<id>ossrh</id>
137-
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
138-
</repository>
139-
</distributionManagement>
120+
- DATAVERSEBOT_GPG_PASSWORD
140121

141-
<plugin>
142-
<groupId>org.sonatype.plugins</groupId>
143-
<artifactId>nexus-staging-maven-plugin</artifactId>
144-
<version>${nexus-staging.version}</version>
145-
<extensions>true</extensions>
146-
<configuration>
147-
<serverId>ossrh</serverId>
148-
<nexusUrl>https://s01.oss.sonatype.org</nexusUrl>
149-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
150-
</configuration>
151-
</plugin>
122+
- DATAVERSEBOT_SONATYPE_TOKEN
152123

153-
Configuring Secrets
154-
~~~~~~~~~~~~~~~~~~~
155-
156-
In GitHub, you will likely need to configure the following secrets:
157-
158-
- DATAVERSEBOT_GPG_KEY
159-
- DATAVERSEBOT_GPG_PASSWORD
160-
- DATAVERSEBOT_SONATYPE_TOKEN
161-
- DATAVERSEBOT_SONATYPE_USERNAME
162-
163-
Note that some of these secrets might be configured at the org level (e.g. gdcc or IQSS).
164-
165-
Many of the automated tasks are performed by the dataversebot account on GitHub: https://github.com/dataversebot
124+
- DATAVERSEBOT_SONATYPE_USERNAME
125+
- If you need an entire new namespace, look at previous issues such as https://issues.sonatype.org/browse/OSSRH-94575 and https://issues.sonatype.org/browse/OSSRH-94577
166126

167127
npm (JavaScript/TypeScript)
168128
---------------------------

0 commit comments

Comments
 (0)