Skip to content

Commit b406670

Browse files
committed
docs:update maven publish.
1 parent 0a66bc1 commit b406670

File tree

9 files changed

+83
-106
lines changed

9 files changed

+83
-106
lines changed

.github/workflows/license-checker.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ on:
44
push:
55
branches:
66
- main
7-
- release*
7+
- release/*
88
pull_request:
99
branches:
1010
- main
11-
- release*
11+
- release/*
1212
jobs:
1313
check-license:
1414
runs-on: ubuntu-latest

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ jobs:
1414
with:
1515
java-version: '8'
1616
distribution: 'temurin'
17-
server-id: ossrh
17+
server-id: central-portal
1818
server-username: MAVEN_USERNAME
1919
server-password: MAVEN_PASSWORD
2020

2121
- name: "Publish package"
2222
env:
23-
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
24-
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
23+
MAVEN_USERNAME: ${{ secrets.CENTRAL_PORTAL_USERNAME }}
24+
MAVEN_PASSWORD: ${{ secrets.CENTRAL_PORTAL_TOKEN }}
2525
run: |
2626
cat <(echo -e "${{ secrets.GPG_PRIVATE_KEY }}") | gpg --batch --import;
2727
mvn clean deploy -P release -Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE }} -DskipTests -B -U

.github/workflows/snapshot.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
push:
66
branches:
77
- main
8-
- release*
8+
- release/*
99

1010
jobs:
1111
check-snapshot:
@@ -36,11 +36,11 @@ jobs:
3636
with:
3737
java-version: '8'
3838
distribution: 'temurin'
39-
server-id: ossrh
39+
server-id: central-portal
4040
server-username: MAVEN_USERNAME
4141
server-password: MAVEN_PASSWORD
4242
- name: Publish package
43-
run: mvn --batch-mode -U -Psonatype clean deploy -DskipTests
43+
run: mvn --batch-mode -U clean deploy -DskipTests
4444
env:
45-
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
46-
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
45+
MAVEN_USERNAME: ${{ secrets.CENTRAL_PORTAL_USERNAME }}
46+
MAVEN_PASSWORD: ${{ secrets.CENTRAL_PORTAL_TOKEN }}

.github/workflows/testing.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ on:
66
push:
77
branches:
88
- main
9-
- release*
9+
- release/*
1010
pull_request:
1111
branches:
1212
- main
13-
- release*
13+
- release/*
1414

1515
jobs:
1616
build:

polaris-plugins/polaris-plugins-configuration-connector/consul-configuration-connector/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
<modelVersion>4.0.0</modelVersion>
1212

1313
<artifactId>consul-configuration-connector</artifactId>
14+
<name>Polaris Plugins Configuration Connector Consul</name>
1415

1516
<dependencies>
1617
<dependency>

polaris-plugins/polaris-plugins-configuration-connector/local-file-configuration-connector/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@
1111
<modelVersion>4.0.0</modelVersion>
1212

1313
<artifactId>local-file-configuration-connector</artifactId>
14+
<name>Polaris Plugins Configuration Connector Local File</name>
1415

1516
</project>

polaris-plugins/polaris-plugins-configuration-connector/polaris-configuration-connector/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
<modelVersion>4.0.0</modelVersion>
1212

1313
<artifactId>polaris-configuration-connector</artifactId>
14+
<name>Polaris Plugins Configuration Connector Polaris</name>
1415

1516
<dependencies>
1617
<dependency>

polaris-plugins/polaris-plugins-configuration-connector/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212

1313
<artifactId>polaris-plugins-configuration-connector</artifactId>
1414
<packaging>pom</packaging>
15-
<name>Polaris Plugins Configuration</name>
16-
<description>Polaris Plugins Configuration POM</description>
15+
<name>Polaris Plugins Configuration Connector</name>
16+
<description>Polaris Plugins Configuration Connector POM</description>
1717

1818
<modules>
1919
<module>polaris-configuration-connector</module>

pom.xml

Lines changed: 66 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@
108108
<maven.deploy.plugin.version>3.0.0-M1</maven.deploy.plugin.version>
109109
<maven.flatten.plugin.version>1.2.5</maven.flatten.plugin.version>
110110
<maven.clean.plugin.version>3.1.0</maven.clean.plugin.version>
111+
<central.publishing.maven.plugin.version>0.8.0</central.publishing.maven.plugin.version>
111112
<okhttp.version>2.7.5</okhttp.version>
112113
<httpclient.version>4.5.14</httpclient.version>
113114
<jacoco-maven-plugin.version>0.8.12</jacoco-maven-plugin.version>
@@ -217,7 +218,7 @@
217218
<execution>
218219
<id>attach-sources</id>
219220
<goals>
220-
<goal>jar</goal>
221+
<goal>jar-no-fork</goal>
221222
</goals>
222223
</execution>
223224
</executions>
@@ -229,6 +230,7 @@
229230
<executions>
230231
<execution>
231232
<id>attach-javadocs</id>
233+
<phase>package</phase>
232234
<goals>
233235
<goal>jar</goal>
234236
</goals>
@@ -240,6 +242,20 @@
240242
<name>date</name>
241243
</tag>
242244
</tags>
245+
<show>public</show>
246+
<charset>UTF-8</charset>
247+
<encoding>UTF-8</encoding>
248+
<docencoding>UTF-8</docencoding>
249+
<links>
250+
<link>http://docs.oracle.com/javase/8/docs/api</link>
251+
</links>
252+
<doclint>none</doclint>
253+
<excludePackageNames>
254+
com.tencent.polaris.*.example,com.tencent.polaris.*.example.*
255+
</excludePackageNames>
256+
<doctitle>Tencent Polaris Java SDK ${project.version} API</doctitle>
257+
<windowtitle>Tencent Polaris Java SDK ${project.version} API
258+
</windowtitle>
243259
</configuration>
244260
</plugin>
245261
<plugin>
@@ -282,36 +298,47 @@
282298
</filesets>
283299
</configuration>
284300
</plugin>
301+
<plugin>
302+
<groupId>org.sonatype.central</groupId>
303+
<artifactId>central-publishing-maven-plugin</artifactId>
304+
<version>${central.publishing.maven.plugin.version}</version>
305+
<extensions>true</extensions>
306+
<configuration>
307+
<publishingServerId>central-portal</publishingServerId>
308+
<excludeArtifacts>
309+
<excludeArtifact>polaris-examples</excludeArtifact>
310+
<excludeArtifact>circuitbreaker-example</excludeArtifact>
311+
<excludeArtifact>common-breaker</excludeArtifact>
312+
<excludeArtifact>instance-breaker-example</excludeArtifact>
313+
<excludeArtifact>method-breaker-example</excludeArtifact>
314+
<excludeArtifact>service-breaker-example</excludeArtifact>
315+
<excludeArtifact>configuration-example</excludeArtifact>
316+
<excludeArtifact>discovery-example</excludeArtifact>
317+
<excludeArtifact>location-example</excludeArtifact>
318+
<excludeArtifact>quickstart-example</excludeArtifact>
319+
<excludeArtifact>quickstart-example-consumer</excludeArtifact>
320+
<excludeArtifact>quickstart-example-provider</excludeArtifact>
321+
<excludeArtifact>ratelimit-example</excludeArtifact>
322+
<excludeArtifact>global-limiter-example</excludeArtifact>
323+
<excludeArtifact>ratelimit-remote-consumer</excludeArtifact>
324+
<excludeArtifact>ratelimit-remote-provider</excludeArtifact>
325+
<excludeArtifact>local-limiter-example</excludeArtifact>
326+
<excludeArtifact>ratelimit-local-consumer</excludeArtifact>
327+
<excludeArtifact>ratelimit-local-provider</excludeArtifact>
328+
<excludeArtifact>router-example</excludeArtifact>
329+
<excludeArtifact>router-multienv-example</excludeArtifact>
330+
<excludeArtifact>router-multienv-gateway</excludeArtifact>
331+
<excludeArtifact>router-multienv-provider</excludeArtifact>
332+
<excludeArtifact>router-version-example</excludeArtifact>
333+
<excludeArtifact>router-version-consumer</excludeArtifact>
334+
<excludeArtifact>router-version-provider</excludeArtifact>
335+
</excludeArtifacts>
336+
</configuration>
337+
</plugin>
285338
</plugins>
286339
</build>
287340

288341
<profiles>
289-
<profile>
290-
<id>sonatype</id>
291-
<repositories>
292-
<repository>
293-
<id>nexus-snapshots</id>
294-
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
295-
<releases>
296-
<enabled>false</enabled>
297-
</releases>
298-
<snapshots>
299-
<enabled>true</enabled>
300-
<updatePolicy>always</updatePolicy>
301-
</snapshots>
302-
</repository>
303-
<repository>
304-
<id>nexus-releases</id>
305-
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
306-
<releases>
307-
<enabled>true</enabled>
308-
</releases>
309-
<snapshots>
310-
<enabled>false</enabled>
311-
</snapshots>
312-
</repository>
313-
</repositories>
314-
</profile>
315342
<profile>
316343
<id>javadoc-lint</id>
317344
<activation>
@@ -325,14 +352,6 @@
325352
<id>release</id>
326353
<build>
327354
<plugins>
328-
<plugin>
329-
<groupId>org.apache.maven.plugins</groupId>
330-
<artifactId>maven-deploy-plugin</artifactId>
331-
<version>${maven.deploy.plugin.version}</version>
332-
<configuration>
333-
<skip>${skip.maven.deploy}</skip>
334-
</configuration>
335-
</plugin>
336355
<plugin>
337356
<groupId>org.apache.maven.plugins</groupId>
338357
<artifactId>maven-gpg-plugin</artifactId>
@@ -347,68 +366,23 @@
347366
</execution>
348367
</executions>
349368
</plugin>
350-
<plugin>
351-
<groupId>org.apache.maven.plugins</groupId>
352-
<artifactId>maven-source-plugin</artifactId>
353-
<version>${maven.source.plugin.version}</version>
354-
<executions>
355-
<execution>
356-
<id>attach-sources</id>
357-
<goals>
358-
<goal>jar-no-fork</goal>
359-
</goals>
360-
</execution>
361-
</executions>
362-
</plugin>
363-
<plugin>
364-
<groupId>org.apache.maven.plugins</groupId>
365-
<artifactId>maven-javadoc-plugin</artifactId>
366-
<version>${maven.javadoc.plugin.version}</version>
367-
<executions>
368-
<execution>
369-
<id>attach-javadocs</id>
370-
<phase>package</phase>
371-
<goals>
372-
<goal>jar</goal>
373-
</goals>
374-
</execution>
375-
</executions>
376-
<configuration>
377-
<tags>
378-
<tag>
379-
<name>date</name>
380-
</tag>
381-
</tags>
382-
<show>public</show>
383-
<charset>UTF-8</charset>
384-
<encoding>UTF-8</encoding>
385-
<docencoding>UTF-8</docencoding>
386-
<links>
387-
<link>http://docs.oracle.com/javase/8/docs/api</link>
388-
</links>
389-
<doclint>none</doclint>
390-
<excludePackageNames>
391-
com.tencent.polaris.*.example,com.tencent.polaris.*.example.*
392-
</excludePackageNames>
393-
<doctitle>Tencent Polaris Java SDK ${project.version} API</doctitle>
394-
<windowtitle>Tencent Polaris Java SDK ${project.version} API
395-
</windowtitle>
396-
</configuration>
397-
</plugin>
398369
</plugins>
399370
</build>
400371
</profile>
401372
</profiles>
402373

403-
<distributionManagement>
404-
<snapshotRepository>
405-
<id>ossrh</id>
406-
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
407-
408-
</snapshotRepository>
374+
<repositories>
409375
<repository>
410-
<id>ossrh</id>
411-
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
376+
<name>Central Portal Snapshots</name>
377+
<id>central-portal-snapshots</id>
378+
<url>https://central.sonatype.com/repository/maven-snapshots/</url>
379+
<releases>
380+
<enabled>false</enabled>
381+
</releases>
382+
<snapshots>
383+
<enabled>true</enabled>
384+
<updatePolicy>always</updatePolicy>
385+
</snapshots>
412386
</repository>
413-
</distributionManagement>
387+
</repositories>
414388
</project>

0 commit comments

Comments
 (0)