Skip to content

Commit 5dcb6f5

Browse files
authored
Removes AutoCloseableRegistry. General cleanup. (#27)
Signed-off-by: Laird Nelson <[email protected]>
1 parent 28f1643 commit 5dcb6f5

27 files changed

+613
-1082
lines changed

.github/workflows/mvn-release-prepare-perform.yaml

Lines changed: 13 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -24,24 +24,24 @@ jobs:
2424
steps:
2525
- id: 'checkout'
2626
name: 'Step: Check Out Project'
27-
uses: 'actions/checkout@v4'
27+
uses: 'actions/checkout@v6'
2828
with:
2929
fetch-depth: 1
3030
persist-credentials: false
3131
- id: 'setup-java'
3232
name: 'Step: Set Up Java and Maven'
33-
uses: 'actions/setup-java@v4'
33+
uses: 'actions/setup-java@v5'
3434
with:
3535
cache: 'maven'
3636
distribution: 'temurin'
3737
gpg-passphrase: 'GPG_PASSPHRASE'
3838
gpg-private-key: '${{ secrets.GPG_PRIVATE_KEY }}'
39-
java-version: '23'
40-
mvn-toolchain-id: 'Temurin 23'
39+
java-version: '25'
40+
mvn-toolchain-id: 'Temurin 25'
4141
mvn-toolchain-vendor: 'openjdk' # see ../../pom.xml
42-
server-id: 'sonatype-oss-repository-hosting' # see https://github.com/microbean/microbean-parent/blob/master/pom.xml#L38
43-
server-password: 'SONATYPE_OSSRH_PASSWORD'
44-
server-username: 'SONATYPE_OSSRH_USERNAME'
42+
server-id: 'central.sonatype.com'
43+
server-password: 'CENTRAL_SONATYPE_COM_PASSWORD'
44+
server-username: 'CENTRAL_SONATYPE_COM_USERNAME'
4545
- id: 'setup-askpass'
4646
name: 'Step: Set Up GIT_ASKPASS'
4747
run: |
@@ -58,29 +58,28 @@ jobs:
5858
- id: 'mvn-release-prepare'
5959
name: 'Step: Maven Release: Prepare, Perform and Publish Site'
6060
env:
61+
CENTRAL_SONATYPE_COM_PASSWORD: '${{ secrets.CENTRAL_SONATYPE_COM_PASSWORD }}'
62+
CENTRAL_SONATYPE_COM_USERNAME: '${{ secrets.CENTRAL_SONATYPE_COM_USERNAME }}'
6163
DRY_RUN: '${{ inputs.dryRun }}'
6264
GIT_ASKPASS: '${{ runner.temp }}/.askpass'
6365
GPG_PASSPHRASE: '${{ secrets.GPG_PASSPHRASE }}'
6466
MVN_DEBUG: ${{ inputs.mvnDebug && '--debug' || '' }}
6567
MVN_TRANSFER_LOGGING: ${{ inputs.mvnTransferLogging && '' || '--no-transfer-progress' }}
6668
PUSH_TOKEN : '${{ secrets.PUSH_TOKEN }}' # critical; see ${GIT_ASKPASS} file
6769
SCM_GIT_HTTPS_URL: 'scm:git:${{ github.server_url }}/${{ github.repository }}.git'
68-
SONATYPE_OSSRH_PASSWORD: '${{ secrets.SONATYPE_OSSRH_PASSWORD }}'
69-
SONATYPE_OSSRH_STAGING_PROFILE_ID: '${{ vars.SONATYPE_OSSRH_STAGING_PROFILE_ID }}'
70-
SONATYPE_OSSRH_USERNAME: '${{ secrets.SONATYPE_OSSRH_USERNAME }}'
7170
shell: 'bash -e {0}'
7271
run: >
7372
git config --global user.email '[email protected]'
7473
7574
git config --global user.name 'microbean'
7675
7776
echo "::group::Running mvn prepare"
78-
77+
7978
./mvnw --batch-mode ${MVN_DEBUG} --errors ${MVN_TRANSFER_LOGGING} release:prepare
8079
-DdryRun="${DRY_RUN}"
8180
-Darguments="${MVN_TRANSFER_LOGGING}"
8281
-Dscm.url="${SCM_GIT_HTTPS_URL}"
83-
82+
8483
scm_tag="$(grep '^scm.tag=' release.properties | cut -f 2 -d =)"
8584
8685
echo "Prepared ${scm_tag}" >> "${GITHUB_STEP_SUMMARY}"
@@ -90,37 +89,13 @@ jobs:
9089
echo "::endgroup::"
9190
9291
echo "::group::Running mvn perform"
93-
94-
set +e
9592
96-
{
9793
./mvnw --batch-mode ${MVN_DEBUG} --errors ${MVN_TRANSFER_LOGGING} release:perform
98-
-Darguments="${MVN_TRANSFER_LOGGING} -Dscmpublish.dryRun=${DRY_RUN} -Dscmpublish.pubScmUrl=${SCM_GIT_HTTPS_URL} -DskipTests -DstagingProfileId=${SONATYPE_OSSRH_STAGING_PROFILE_ID}"
94+
-Darguments="${MVN_TRANSFER_LOGGING} -Dscmpublish.dryRun=${DRY_RUN} -Dscmpublish.pubScmUrl=${SCM_GIT_HTTPS_URL} -DskipTests -DautoPublish=true -DwaitUntil=published -DwaitMaxTime=3600"
9995
-DdryRun="${DRY_RUN}"
10096
-Dgoals="process-classes,post-site,scm-publish:publish-scm,deploy"
10197
-Dscm.url="${SCM_GIT_HTTPS_URL}"
102-
|
103-
tee /dev/fd/3
104-
|
105-
grep --invert-match --silent 'Java class com.sonatype.nexus.staging.api.dto.StagingProfileRepositoryDTO' || cat > /dev/null
106-
;
107-
}
108-
3>&1
10998
110-
exit_codes=(${PIPESTATUS[@]})
99+
echo "Released ${scm_tag} successfully" >> "${GITHUB_STEP_SUMMARY}";
111100
112101
echo "::endgroup::"
113-
114-
set -e
115-
116-
if [ "${exit_codes[2]}" -ne 0 ] ; then
117-
# grep "failed" (found com.sonatype.nexus.staging.api.dto.StagingProfileRepositoryDTO) and mvn failed
118-
echo "Released ${scm_tag} successfully, but verify that the staging repository was successfully released" >> "${GITHUB_STEP_SUMMARY}";
119-
# Treat this as a successful run
120-
exit 0;
121-
elif [ "${exit_codes[0]}" -eq 0 ] ; then
122-
# mvn succeeded and grep "succeeded" (did not find com.sonatype.nexus.staging.api.dto.StagingProfileRepositoryDTO)
123-
echo "Released ${scm_tag} successfully" >> "${GITHUB_STEP_SUMMARY}";
124-
fi
125-
126-
exit "${exit_codes[0]}"

.github/workflows/mvn-verify.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,18 @@ jobs:
1212
steps:
1313
- id: 'checkout'
1414
name: 'Step: Checkout'
15-
uses: 'actions/checkout@v4'
15+
uses: 'actions/checkout@v6'
1616
with:
1717
fetch-depth: 1
1818
persist-credentials: false
1919
- id: 'setup-java'
2020
name: 'Step: Set Up Java and Maven'
21-
uses: 'actions/setup-java@v4'
21+
uses: 'actions/setup-java@v5'
2222
with:
2323
cache: 'maven'
2424
distribution: 'temurin'
25-
java-version: '23'
26-
mvn-toolchain-id: 'Temurin 23'
25+
java-version: '25'
26+
mvn-toolchain-id: 'Temurin 25'
2727
mvn-toolchain-vendor: 'openjdk' # see ../../pom.xml
2828
- id: 'mvn-verify'
2929
name: 'Step: Maven Verify'

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ dependency:
2828
<groupId>org.microbean</groupId>
2929
<artifactId>microbean-bean</artifactId>
3030
<!-- Always check https://central.sonatype.com/artifact/org.microbean/microbean-bean for up-to-date available versions. -->
31-
<version>0.0.19</version>
31+
<version>0.0.20</version>
3232
</dependency>
3333
```
3434

pom.xml

Lines changed: 31 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -52,20 +52,11 @@
5252
</issueManagement>
5353

5454
<distributionManagement>
55-
<repository>
56-
<id>sonatype-oss-repository-hosting</id>
57-
<!-- See https://central.sonatype.org/publish/publish-maven/#distribution-management-and-authentication -->
58-
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
59-
</repository>
6055
<site>
6156
<id>Github Pages</id>
6257
<name>microBean™ Bean Site</name>
6358
<url>https://microbean.github.io/microbean-bean/</url>
6459
</site>
65-
<snapshotRepository>
66-
<id>sonatype-oss-repository-hosting</id>
67-
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
68-
</snapshotRepository>
6960
</distributionManagement>
7061

7162
<properties>
@@ -89,7 +80,6 @@
8980
<releaseProfiles>deployment</releaseProfiles>
9081
<scmCommentPrefix>[maven-release-plugin] [skip ci]</scmCommentPrefix>
9182
<tagNameFormat>v@{project.version}</tagNameFormat>
92-
<useReleaseProfile>false</useReleaseProfile>
9383

9484
<!-- maven-scm-publish-plugin properties;
9585
see https://maven.apache.org/plugins/maven-scm-publish-plugin/publish-scm-mojo.html -->
@@ -101,13 +91,9 @@
10191
<maven.site.deploy.skip>true</maven.site.deploy.skip>
10292
<relativizeDecorationLinks>false</relativizeDecorationLinks>
10393

104-
<!-- nexus-staging-maven-plugin properties -->
105-
<!-- See https://github.com/sonatype/nexus-maven-plugins/blob/0aee3defb33cb133ff536aba59b11d32a368b1e6/staging/maven-plugin/src/main/java/org/sonatype/nexus/maven/staging/AbstractStagingMojo.java#L169-L175 -->
106-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
107-
<!-- <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl> -->
108-
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
109-
<stagingProgressTimeoutMinutes>10</stagingProgressTimeoutMinutes>
110-
94+
<!-- central-publishing-maven-plugin properties -->
95+
<deploymentName>${project.name} v${project.version}</deploymentName>
96+
11197
<!-- Other properties -->
11298
<project.build.sourceEncoding>UTF8</project.build.sourceEncoding>
11399
<project.reporting.outputEncoding>UTF8</project.reporting.outputEncoding>
@@ -125,7 +111,7 @@
125111
<dependency>
126112
<groupId>org.junit</groupId>
127113
<artifactId>junit-bom</artifactId>
128-
<version>5.13.1</version>
114+
<version>6.0.1</version>
129115
<type>pom</type>
130116
<scope>import</scope>
131117
</dependency>
@@ -144,25 +130,25 @@
144130
<dependency>
145131
<groupId>org.microbean</groupId>
146132
<artifactId>microbean-assign</artifactId>
147-
<version>0.0.6</version>
133+
<version>0.0.9</version>
148134
</dependency>
149135

150136
<dependency>
151137
<groupId>org.microbean</groupId>
152138
<artifactId>microbean-attributes</artifactId>
153-
<version>0.0.3</version>
139+
<version>0.0.5</version>
154140
</dependency>
155141

156142
<dependency>
157143
<groupId>org.microbean</groupId>
158144
<artifactId>microbean-constant</artifactId>
159-
<version>0.0.7</version>
145+
<version>0.0.8</version>
160146
</dependency>
161147

162148
<dependency>
163149
<groupId>org.microbean</groupId>
164150
<artifactId>microbean-construct</artifactId>
165-
<version>0.0.11</version>
151+
<version>0.0.18</version>
166152
</dependency>
167153

168154
</dependencies>
@@ -227,11 +213,11 @@
227213
<plugins>
228214
<plugin>
229215
<artifactId>maven-antrun-plugin</artifactId>
230-
<version>3.1.0</version>
216+
<version>3.2.0</version>
231217
</plugin>
232218
<plugin>
233219
<artifactId>maven-assembly-plugin</artifactId>
234-
<version>3.7.1</version>
220+
<version>3.8.0</version>
235221
</plugin>
236222
<plugin>
237223
<artifactId>maven-checkstyle-plugin</artifactId>
@@ -341,7 +327,7 @@
341327
<dependency>
342328
<groupId>com.puppycrawl.tools</groupId>
343329
<artifactId>checkstyle</artifactId>
344-
<version>10.12.6</version>
330+
<version>12.3.0</version>
345331
</dependency>
346332
</dependencies>
347333
</plugin>
@@ -362,7 +348,7 @@
362348
</plugin>
363349
<plugin>
364350
<artifactId>maven-compiler-plugin</artifactId>
365-
<version>3.14.0</version>
351+
<version>3.14.1</version>
366352
<configuration>
367353
<compilerArgs>
368354
<arg>-Xlint:all</arg>
@@ -372,32 +358,31 @@
372358
</plugin>
373359
<plugin>
374360
<artifactId>maven-dependency-plugin</artifactId>
375-
<version>3.8.1</version>
361+
<version>3.9.0</version>
376362
</plugin>
377363
<plugin>
378364
<artifactId>maven-deploy-plugin</artifactId>
379365
<version>3.1.4</version>
380366
</plugin>
381367
<plugin>
382368
<artifactId>maven-enforcer-plugin</artifactId>
383-
<version>3.5.0</version>
369+
<version>3.6.2</version>
384370
</plugin>
385371
<plugin>
386372
<artifactId>maven-gpg-plugin</artifactId>
387-
<!-- <version>3.1.0</version> -->
388-
<version>3.2.7</version>
373+
<version>3.2.8</version>
389374
</plugin>
390375
<plugin>
391376
<artifactId>maven-install-plugin</artifactId>
392377
<version>3.1.4</version>
393378
</plugin>
394379
<plugin>
395380
<artifactId>maven-jar-plugin</artifactId>
396-
<version>3.4.2</version>
381+
<version>3.5.0</version>
397382
</plugin>
398383
<plugin>
399384
<artifactId>maven-javadoc-plugin</artifactId>
400-
<version>3.11.2</version>
385+
<version>3.12.0</version>
401386
<configuration>
402387
<docfilessubdirs>true</docfilessubdirs>
403388
<tags>
@@ -429,16 +414,15 @@
429414
</plugin>
430415
<plugin>
431416
<artifactId>maven-release-plugin</artifactId>
432-
<!-- <version>3.0.0-M6</version> --> <!-- see https://issues.apache.org/jira/browse/MRELEASE-1038 -->
433-
<version>3.1.1</version>
417+
<version>3.3.1</version>
434418
</plugin>
435419
<plugin>
436420
<artifactId>maven-resources-plugin</artifactId>
437-
<version>3.3.1</version>
421+
<version>3.4.0</version>
438422
</plugin>
439423
<plugin>
440424
<artifactId>maven-scm-plugin</artifactId>
441-
<version>2.1.0</version>
425+
<version>2.2.1</version>
442426
</plugin>
443427
<plugin>
444428
<artifactId>maven-scm-publish-plugin</artifactId>
@@ -450,7 +434,7 @@
450434
</plugin>
451435
<plugin>
452436
<artifactId>maven-source-plugin</artifactId>
453-
<version>3.3.1</version>
437+
<version>3.4.0</version>
454438
<executions>
455439
<execution>
456440
<id>attach-sources</id>
@@ -462,7 +446,7 @@
462446
</plugin>
463447
<plugin>
464448
<artifactId>maven-surefire-plugin</artifactId>
465-
<version>3.5.3</version>
449+
<version>3.5.4</version>
466450
</plugin>
467451
<plugin>
468452
<artifactId>maven-toolchains-plugin</artifactId>
@@ -471,35 +455,25 @@
471455
<plugin>
472456
<groupId>com.github.spotbugs</groupId>
473457
<artifactId>spotbugs-maven-plugin</artifactId>
474-
<version>4.9.3.0</version>
458+
<version>4.9.8.2</version>
475459
</plugin>
476460
<plugin>
477461
<groupId>org.codehaus.mojo</groupId>
478462
<artifactId>versions-maven-plugin</artifactId>
479-
<version>2.18.0</version>
463+
<version>2.20.1</version>
480464
</plugin>
481465
<plugin>
482466
<groupId>io.smallrye</groupId>
483467
<artifactId>jandex-maven-plugin</artifactId>
484-
<version>3.3.1</version>
468+
<version>3.5.3</version>
485469
</plugin>
486470
<plugin>
487-
<groupId>org.sonatype.plugins</groupId>
488-
<artifactId>nexus-staging-maven-plugin</artifactId>
489-
<version>1.6.13</version>
471+
<groupId>org.sonatype.central</groupId>
472+
<artifactId>central-publishing-maven-plugin</artifactId>
473+
<version>0.9.0</version>
490474
<extensions>true</extensions>
491-
<dependencies>
492-
<!-- https://issues.sonatype.org/browse/NEXUS-26993?focusedCommentId=1098136&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-1098136 -->
493-
<dependency>
494-
<groupId>com.thoughtworks.xstream</groupId>
495-
<artifactId>xstream</artifactId>
496-
<version>1.4.20</version>
497-
</dependency>
498-
</dependencies>
499475
<configuration>
500-
<serverId>sonatype-oss-repository-hosting</serverId>
501-
<nexusUrl>${nexusUrl}</nexusUrl>
502-
<autoReleaseAfterClose>${autoReleaseAfterClose}</autoReleaseAfterClose>
476+
<publishingServerId>central.sonatype.com</publishingServerId>
503477
</configuration>
504478
</plugin>
505479
</plugins>
@@ -545,8 +519,8 @@
545519
</configuration>
546520
</plugin>
547521
<plugin>
548-
<groupId>org.sonatype.plugins</groupId>
549-
<artifactId>nexus-staging-maven-plugin</artifactId>
522+
<groupId>org.sonatype.central</groupId>
523+
<artifactId>central-publishing-maven-plugin</artifactId>
550524
</plugin>
551525
</plugins>
552526

0 commit comments

Comments
 (0)