Skip to content

Commit 88db995

Browse files
committed
ICU-23148 Migrate ICU4J publishing from Legacy OSSRH to Central Portal
1 parent fd27c48 commit 88db995

File tree

9 files changed

+58
-217
lines changed

9 files changed

+58
-217
lines changed

.github/workflows/release-icu4j-maven.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
with:
5656
java-version: '11'
5757
distribution: 'temurin'
58-
server-id: icu4j-maven-repo # Value of the distributionManagement/repository/id field of the pom.xml
58+
server-id: central # Value of the distributionManagement/repository/id field of the pom.xml
5959
server-username: MAVEN_USERNAME # env variable for username in deploy
6060
server-password: MAVEN_CENTRAL_TOKEN # env variable for token in deploy
6161
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import

docs/devsetup/java/ant/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,4 +243,4 @@ ICU4J plugin test - Note: This is currently broken
243243
244244
## Building ICU4J Release Files
245245
246-
See [Release Build](../../../processes/release/tasks/release-build.md)
246+
See [Release Build](../../../processes/release/tasks/publish/release.md)
-69.2 KB
Binary file not shown.

docs/processes/release/tasks/publish/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,13 +234,13 @@ Look at previous releases for an example.
234234

235235
**Post 76.1 see [Publish - Version 76.1](release.md)**
236236

237-
Follow instructions here: [Building ICU4J Release Files](../release-build.md)
237+
Follow instructions here: [Building ICU4J Release Files](release.md)
238238

239239
### C source/binary:
240240

241241
**Post 76.1 see [Publish - Version 76.1](release.md)**
242242

243-
<span style="background:yellow">***WORK IN PROGRESS***</a>
243+
<span style="background:yellow">***WORK IN PROGRESS***</span>
244244

245245
#### Source and Linux Binaries:
246246

docs/processes/release/tasks/publish/release.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,35 @@ Here you should use the release tag.
7373
the promotion to Maven Central.
7474
* The unified Java documentation, (`icu4j-76.1-fulljavadoc.jar`) \
7575
**WARNING:** this is also the one to be published (unpacked) for web access
76+
* Make sure to set the proper parameters:
77+
* **Branch:** the branch prepared for release, for example `maint/maint-77`
78+
* **Run the tests:** checked (default)
79+
* **Deploy to Maven Central:** check (unchecked by default), if you are ready
80+
for a real deployment and not doing just a sanity check
81+
* **Release tag to upload to:** should be the GitHub draft release prepared
82+
in a previous BRS step.
7683

7784
1. **Release - Create checksums and GPG sign** (`release-check-sign.yml`) \
7885
THIS SHOULD BE THE LAST ACTION YOU RUN. \
7986
After all the artifacts from the previous steps are posted to the release. \
8087
The action will download all the artifacts from release,
8188
create checksum files (`SHASUM512.txt` and `*.md5`),
8289
and digital signature files (`*.asc`)
90+
91+
1. **Login to Sonatype, sanity check, and approve** \
92+
The previous step stages the Maven artifacts to Sonatype, but does
93+
not automatically push them to Maven Central. \
94+
It can be enabled, but we chose no to enable it by default so that a human can do a last sanity check. \
95+
So someone must login to Sonatype, check that everything looks fine, and approve. \
96+
<span style="color:red"><b>Note:</b> only someone with a Sonatype account
97+
that was authorized for `com.ibm.icu` can approve. \
98+
You can find the list of people with such access in the team shared folder.</span> \
99+
To do that:
100+
* log on to the [Sonatype Central Portal -- Namespaces](https://central.sonatype.com/publishing/namespaces).
101+
* Select the "Deployments" tab.
102+
* Check the files staged there, compare to a previous public release in Maven Central
103+
(for example [ICU4J 77.1](https://repo1.maven.org/maven2/com/ibm/icu/icu4j/77.1/)
104+
and [ICU4J Charset 77.1](https://repo1.maven.org/maven2/com/ibm/icu/icu4j-charset/77.1/)) \
105+
For now sanity check is probably: make sure there are no errors / warnings, make sure the new staged files match the ones in the 2 links above.
106+
* Once you confirm the contents, approve it.
107+
* <span style="color:red"><b>TODO: update this doc with screenshot(s) once we have a release staged.</b><span>

docs/processes/release/tasks/release-build.md

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

icu4j/main/charset/pom.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,13 @@
8888
<skip>false</skip>
8989
</configuration>
9090
</plugin>
91+
<plugin>
92+
<groupId>org.sonatype.central</groupId>
93+
<artifactId>central-publishing-maven-plugin</artifactId>
94+
<configuration>
95+
<skipPublishing>false</skipPublishing>
96+
</configuration>
97+
</plugin>
9198
</plugins>
9299
</build>
93100

icu4j/main/icu4j/pom.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,13 @@
132132
<skip>false</skip>
133133
</configuration>
134134
</plugin>
135+
<plugin>
136+
<groupId>org.sonatype.central</groupId>
137+
<artifactId>central-publishing-maven-plugin</artifactId>
138+
<configuration>
139+
<skipPublishing>false</skipPublishing>
140+
</configuration>
141+
</plugin>
135142
</plugins>
136143
</build>
137144

icu4j/pom.xml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@
5050
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
5151
<maven.compiler.release>11</maven.compiler.release>
5252

53-
<maven-central-repo-url>https://oss.sonatype.org</maven-central-repo-url>
54-
<maven-central-releases-repo-url>${maven-central-repo-url}/service/local/staging/deploy/maven2</maven-central-releases-repo-url>
55-
<maven-central-snapshots-repo-url>${maven-central-repo-url}/content/repositories/snapshots</maven-central-snapshots-repo-url>
53+
<maven-central-repo-url>https://central.sonatype.com</maven-central-repo-url>
54+
<maven-central-releases-repo-url>${maven-central-repo-url}</maven-central-releases-repo-url>
55+
<maven-central-snapshots-repo-url>${maven-central-repo-url}/repository/maven-snapshots/</maven-central-snapshots-repo-url>
5656

5757
<!-- This is the folder where we gather the files to be posted in the Github Release-->
5858
<release.directory>${project.build.directory}/release_directory</release.directory>
@@ -178,12 +178,12 @@
178178

179179
<distributionManagement>
180180
<repository>
181-
<id>icu4j-maven-repo</id>
181+
<id>central</id>
182182
<name>ICU4J Central Repository</name>
183183
<url>${maven-central-releases-repo-url}</url>
184184
</repository>
185185
<snapshotRepository>
186-
<id>icu4j-maven-repo</id>
186+
<id>central</id>
187187
<name>ICU4J Central Development Repository</name>
188188
<url>${maven-central-snapshots-repo-url}</url>
189189
</snapshotRepository>
@@ -236,6 +236,16 @@
236236
<skip>true</skip>
237237
</configuration>
238238
</plugin>
239+
<plugin>
240+
<!-- https://central.sonatype.org/publish/publish-portal-maven/ -->
241+
<groupId>org.sonatype.central</groupId>
242+
<artifactId>central-publishing-maven-plugin</artifactId>
243+
<version>0.8.0</version>
244+
<extensions>true</extensions>
245+
<configuration>
246+
<checksums>required</checksums>
247+
</configuration>
248+
</plugin>
239249
<plugin>
240250
<artifactId>maven-site-plugin</artifactId>
241251
<version>4.0.0-M16</version>

0 commit comments

Comments
 (0)