Skip to content

Commit bbd7b82

Browse files
authored
feat: new mvn publish (#92)
* feat: new mvn publish * feat: add project name
1 parent 08bcda2 commit bbd7b82

File tree

10 files changed

+18
-15
lines changed

10 files changed

+18
-15
lines changed

.github/workflows/mvn_publish.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@ jobs:
2727
with:
2828
java-version: '8'
2929
distribution: 'zulu'
30-
server-id: ossrh
30+
server-id: central
3131
server-username: MAVEN_USERNAME
32-
server-password: MAVEN_PASSWORD
32+
server-password: MAVEN_CENTRAL_TOKEN
3333
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import
3434
gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase
3535

3636
- name: Build with Maven
3737
run: mvn clean deploy --batch-mode -DskipTests -P release -B -U -e
3838
env:
3939
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
40-
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
40+
MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }}
4141
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}

ingester-all/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
</parent>
2626

2727
<artifactId>ingester-all</artifactId>
28+
<name>${project.groupId}:${project.artifactId}</name>
2829

2930
<dependencies>
3031
<dependency>

ingester-bulk-protocol/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
</parent>
2626

2727
<artifactId>ingester-bulk-protocol</artifactId>
28+
<name>${project.groupId}:${project.artifactId}</name>
2829

2930
<properties>
3031
<arrow.flight.version>14.0.2</arrow.flight.version>

ingester-common/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
</parent>
2626

2727
<artifactId>ingester-common</artifactId>
28+
<name>${project.groupId}:${project.artifactId}</name>
2829

2930
<properties>
3031
<metrics.version>4.2.11</metrics.version>

ingester-example/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
</parent>
2626

2727
<artifactId>ingester-example</artifactId>
28+
<name>${project.groupId}:${project.artifactId}</name>
2829

2930
<dependencies>
3031
<dependency>

ingester-grpc/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
</parent>
2626

2727
<artifactId>ingester-grpc</artifactId>
28+
<name>${project.groupId}:${project.artifactId}</name>
2829

2930
<properties>
3031
<io.grpc.version>1.56.1</io.grpc.version>

ingester-prometheus-metrics/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
<version>0.15.0</version>
2525
</parent>
2626
<artifactId>ingester-prometheus-metrics</artifactId>
27+
<name>${project.groupId}:${project.artifactId}</name>
2728

2829
<properties>
2930
<prometheus.version>0.16.0</prometheus.version>

ingester-protocol/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
</parent>
2626

2727
<artifactId>ingester-protocol</artifactId>
28+
<name>${project.groupId}:${project.artifactId}</name>
2829

2930
<properties>
3031
<greptimedb.proto.version>0.9.0</greptimedb.proto.version>

ingester-rpc/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
</parent>
2626

2727
<artifactId>ingester-rpc</artifactId>
28+
<name>${project.groupId}:${project.artifactId}</name>
2829

2930
<dependencies>
3031
<dependency>

pom.xml

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,9 @@
6363

6464
<distributionManagement>
6565
<repository>
66-
<id>ossrh</id>
67-
<url>https://ossrh-staging-api.central.sonatype.com/service/local/staging/deploy/maven2/</url>
66+
<id>central</id>
67+
<url>https://central.sonatype.com/api/v1/publisher/deployments</url>
6868
</repository>
69-
<snapshotRepository>
70-
<id>ossrh</id>
71-
<url>https://central.sonatype.com/repository/maven-snapshots/</url>
72-
</snapshotRepository>
7369
</distributionManagement>
7470

7571
<properties>
@@ -284,14 +280,13 @@
284280
<build>
285281
<plugins>
286282
<plugin>
287-
<groupId>org.sonatype.plugins</groupId>
288-
<artifactId>nexus-staging-maven-plugin</artifactId>
289-
<version>${nexus-staging-maven-plugin.version}</version>
283+
<groupId>org.sonatype.central</groupId>
284+
<artifactId>central-publishing-maven-plugin</artifactId>
285+
<version>0.4.0</version>
290286
<extensions>true</extensions>
291287
<configuration>
292-
<serverId>ossrh</serverId>
293-
<nexusUrl>https://ossrh-staging-api.central.sonatype.com/</nexusUrl>
294-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
288+
<publishingServerId>central</publishingServerId>
289+
<tokenAuth>true</tokenAuth>
295290
</configuration>
296291
</plugin>
297292
<plugin>

0 commit comments

Comments
 (0)