Skip to content

Commit 4295298

Browse files
committed
chore: migrate Sonatype OSSRH to Central Portal
1 parent 3230def commit 4295298

File tree

8 files changed

+68
-85
lines changed

8 files changed

+68
-85
lines changed

.github/workflows/maven-master-pulls.yml

Lines changed: 14 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,17 @@ jobs:
1313
java: [ 11 ]
1414

1515
steps:
16-
- uses: actions/checkout@v2
16+
- uses: actions/checkout@v4
1717
- name: Set up Java
18-
uses: actions/setup-java@v1
18+
uses: actions/setup-java@v4
1919
with:
2020
java-version: ${{ matrix.java }}
21+
distribution: temurin
22+
server-id: central
23+
server-username: MAVEN_USERNAME
24+
server-password: MAVEN_PASSWORD
2125
- name: Cache local Maven repository
22-
uses: actions/cache@v2
26+
uses: actions/cache@v4
2327
with:
2428
path: ~/.m2/repository
2529
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
@@ -36,34 +40,21 @@ jobs:
3640
java: [ 8 ]
3741

3842
steps:
39-
- uses: actions/checkout@v2
43+
- uses: actions/checkout@v4
4044
- name: Set up Java
41-
uses: actions/setup-java@v1
45+
uses: actions/setup-java@v4
4246
with:
4347
java-version: ${{ matrix.java }}
48+
distribution: temurin
49+
server-id: central
50+
server-username: MAVEN_USERNAME
51+
server-password: MAVEN_PASSWORD
4452
- name: Cache local Maven repository
45-
uses: actions/cache@v2
53+
uses: actions/cache@v4
4654
with:
4755
path: ~/.m2/repository
4856
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
4957
restore-keys: |
5058
${{ runner.os }}-maven-
5159
- name: Build with Maven
5260
run: mvn -B -U clean verify -DskipTests -Dmaven.test.skip=true -Dmaven.site.skip=true -Dmaven.javadoc.skip=true -Psamples-java8 --file pom.xml
53-
54-
scan-with-lacework:
55-
name: Trigger LaceWork Scanning
56-
runs-on: ubuntu-latest
57-
58-
needs: [ build ]
59-
if: success()
60-
61-
steps:
62-
- name: Trigger LaceWork Scanning using a different method
63-
run: |
64-
docker run -e LW_ACCOUNT_NAME=$LW_ACCOUNT_NAME -e LW_ACCESS_TOKEN=$LW_ACCESS_TOKEN -e LW_SCANNER_SAVE_RESULTS=true -e LW_SCANNER_DISABLE_UPDATES=false -v /var/run/docker.sock:/var/run/docker.sock lacework/lacework-inline-scanner:latest image evaluate swaggerapi/swagger-codegen-cli latest --docker-server index.docker.io --docker-username $docker_user --docker-password $docker_password > /dev/null 2>&1
65-
env:
66-
LW_ACCOUNT_NAME: ${{ secrets.LW_ACCOUNT_NAME }}
67-
LW_ACCESS_TOKEN: ${{ secrets.LW_ACCESS_TOKEN }}
68-
docker_user: ${{ secrets.DOCKERHUB_SB_USERNAME}}
69-
docker_password: ${{ secrets.DOCKERHUB_SB_PASSWORD}}

.github/workflows/maven-master.yml

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,22 @@ jobs:
1313
java: [ 11 ]
1414

1515
steps:
16-
- uses: actions/checkout@v2
16+
- uses: actions/checkout@v4
1717
- name: Set up Java
18-
uses: actions/setup-java@v3
18+
uses: actions/setup-java@v4
1919
with:
2020
java-version: ${{ matrix.java }}
2121
distribution: temurin
22-
cache: maven
22+
server-id: central
23+
server-username: MAVEN_USERNAME
24+
server-password: MAVEN_PASSWORD
25+
- name: Cache local Maven repository
26+
uses: actions/cache@v4
27+
with:
28+
path: ~/.m2/repository
29+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
30+
restore-keys: |
31+
${{ runner.os }}-maven-
2332
- name: Set up QEMU
2433
uses: docker/setup-qemu-action@v3
2534
- name: Set up Docker Buildx
@@ -28,20 +37,6 @@ jobs:
2837
run: |
2938
docker login --username=${{ secrets.DOCKERHUB_SB_USERNAME }} --password=${{ secrets.DOCKERHUB_SB_PASSWORD }}
3039
set -e
31-
- uses: s4u/[email protected]
32-
name: setup maven settings.xml
33-
with:
34-
servers: |
35-
[{
36-
"id": "sonatype-nexus-staging",
37-
"username": "${{ secrets.OSSRH_USERNAME }}",
38-
"password": "${{ secrets.OSSRH_TOKEN }}"
39-
},
40-
{
41-
"id": "sonatype-nexus-snapshots",
42-
"username": "${{ secrets.OSSRH_USERNAME }}",
43-
"password": "${{ secrets.OSSRH_TOKEN }}"
44-
}]
4540
- name: Build with Maven
4641
run: mvn -B -U verify --file pom.xml
4742
- name: Deploy Maven Snapshot
@@ -82,13 +77,17 @@ jobs:
8277
java: [ 8 ]
8378

8479
steps:
85-
- uses: actions/checkout@v2
80+
- uses: actions/checkout@v4
8681
- name: Set up Java
87-
uses: actions/setup-java@v1
82+
uses: actions/setup-java@v4
8883
with:
8984
java-version: ${{ matrix.java }}
85+
distribution: temurin
86+
server-id: central
87+
server-username: MAVEN_USERNAME
88+
server-password: MAVEN_PASSWORD
9089
- name: Cache local Maven repository
91-
uses: actions/cache@v2
90+
uses: actions/cache@v4
9291
with:
9392
path: ~/.m2/repository
9493
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ Swagger Codegen Version | Release Date | Swagger / OpenAPI Spec compatibility
6464

6565
Swagger Codegen Version | Release Date | Swagger / OpenAPI Spec compatibility | Notes
6666
-------------------------- |--------------| -------------------------- | -----
67-
3.0.66-SNAPSHOT (current 3.0.0, upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/io/swagger/codegen/v3/swagger-codegen-cli/3.0.66-SNAPSHOT/)| TBD | 1.0, 1.1, 1.2, 2.0, 3.0 | Minor release
68-
2.4.45-SNAPSHOT (current master, upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/io/swagger/swagger-codegen-cli/2.4.45-SNAPSHOT/)| TBD | 1.0, 1.1, 1.2, 2.0 | Minor release
67+
3.0.66-SNAPSHOT (current 3.0.0, upcoming minor release) [SNAPSHOT](https://central.sonatype.com/service/rest/repository/browse/maven-snapshots/io/swagger/codegen/v3/swagger-codegen-cli/3.0.66-SNAPSHOT/)| TBD | 1.0, 1.1, 1.2, 2.0, 3.0 | Minor release
68+
2.4.45-SNAPSHOT (current master, upcoming minor release) [SNAPSHOT](https://central.sonatype.com/service/rest/repository/browse/maven-snapshots/io/swagger/swagger-codegen-cli/2.4.45-SNAPSHOT/)| TBD | 1.0, 1.1, 1.2, 2.0 | Minor release
6969

7070
For detailed breakdown of all versions, please see the [full compatibility listing](./docs/compatibility.md).
7171

docs/compatibility.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ The Swagger Codegen project has the following compatibilities with the OpenAPI S
44

55
Swagger Codegen Version | Release Date | OpenAPI Spec compatibility | Notes
66
-------------------------- |--------------| -------------------------- | -----
7-
3.0.66-SNAPSHOT (current 3.0.0, upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/io/swagger/codegen/v3/swagger-codegen-cli/3.0.66-SNAPSHOT/)| TBD | 1.0, 1.1, 1.2, 2.0, 3.0 | Minor release
7+
3.0.66-SNAPSHOT (current 3.0.0, upcoming minor release) [SNAPSHOT](https://central.sonatype.com/service/rest/repository/browse/maven-snapshots/io/swagger/codegen/v3/swagger-codegen-cli/3.0.66-SNAPSHOT/)| TBD | 1.0, 1.1, 1.2, 2.0, 3.0 | Minor release
88
[3.0.65](https://github.com/swagger-api/swagger-codegen/releases/tag/v3.0.65) (**current stable**) | 2024-12-18 | 1.0, 1.1, 1.2, 2.0, 3.0 | [tag v3.0.65](https://github.com/swagger-api/swagger-codegen/tree/v3.0.65)
99
[3.0.64](https://github.com/swagger-api/swagger-codegen/releases/tag/v3.0.64) | 2024-11-07 | 1.0, 1.1, 1.2, 2.0, 3.0 | [tag v3.0.64](https://github.com/swagger-api/swagger-codegen/tree/v3.0.64)
1010
[3.0.63](https://github.com/swagger-api/swagger-codegen/releases/tag/v3.0.63) | 2024-10-16 | 1.0, 1.1, 1.2, 2.0, 3.0 | [tag v3.0.63](https://github.com/swagger-api/swagger-codegen/tree/v3.0.63)
@@ -70,7 +70,7 @@ Swagger Codegen Version | Release Date | OpenAPI Spec compatibility | Notes
7070
[3.0.2](https://github.com/swagger-api/swagger-codegen/releases/tag/v3.0.2)| 2018-10-19 | 1.0, 1.1, 1.2, 2.0, 3.0 | Minor release
7171
[3.0.1](https://github.com/swagger-api/swagger-codegen/releases/tag/v3.0.1)| 2018-10-05 | 1.0, 1.1, 1.2, 2.0, 3.0 | Major release with breaking changes
7272
[3.0.0](https://github.com/swagger-api/swagger-codegen/releases/tag/v3.0.0)| 2018-09-06 | 1.0, 1.1, 1.2, 2.0, 3.0 | Major release with breaking changes
73-
2.4.45-SNAPSHOT (current master, upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/io/swagger/swagger-codegen-cli/2.4.45-SNAPSHOT/)| TBD | 1.0, 1.1, 1.2, 2.0 | Minor release
73+
2.4.45-SNAPSHOT (current master, upcoming minor release) [SNAPSHOT](https://central.sonatype.com/service/rest/repository/browse/maven-snapshots/io/swagger/swagger-codegen-cli/2.4.45-SNAPSHOT/)| TBD | 1.0, 1.1, 1.2, 2.0 | Minor release
7474
[2.4.44](https://github.com/swagger-api/swagger-codegen/releases/tag/v2.4.44) (**current stable**) | 2024-12-18 | 1.0, 1.1, 1.2, 2.0 | [tag v2.4.44](https://github.com/swagger-api/swagger-codegen/tree/v2.4.44)
7575
[2.4.43](https://github.com/swagger-api/swagger-codegen/releases/tag/v2.4.43) | 2024-08-09 | 1.0, 1.1, 1.2, 2.0 | [tag v2.4.43](https://github.com/swagger-api/swagger-codegen/tree/v2.4.43)
7676
[2.4.42](https://github.com/swagger-api/swagger-codegen/releases/tag/v2.4.42) | 2024-07-29 | 1.0, 1.1, 1.2, 2.0 | [tag v2.4.42](https://github.com/swagger-api/swagger-codegen/tree/v2.4.42)

modules/swagger-codegen-cli/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<packaging>jar</packaging>
1313

1414
<name>swagger-codegen (executable)</name>
15-
15+
<description>swagger-codegen (executable)</description>
1616
<build>
1717
<finalName>swagger-codegen-cli</finalName>
1818
<resources>

modules/swagger-codegen/pom.xml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
<artifactId>swagger-codegen</artifactId>
1111
<packaging>jar</packaging>
1212
<name>swagger-codegen (core library)</name>
13+
<description>swagger-codegen (core library)</description>
1314
<build>
1415
<sourceDirectory>src/main/java</sourceDirectory>
1516
<defaultGoal>install</defaultGoal>
@@ -294,13 +295,4 @@
294295
<scope>test</scope>
295296
</dependency>
296297
</dependencies>
297-
<repositories>
298-
<repository>
299-
<id>sonatype-snapshots</id>
300-
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
301-
<snapshots>
302-
<enabled>true</enabled>
303-
</snapshots>
304-
</repository>
305-
</repositories>
306298
</project>

modules/swagger-generator/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
<artifactId>swagger-generator</artifactId>
1111
<packaging>war</packaging>
1212
<name>swagger-generator</name>
13+
<description>swagger-generator</description>
1314
<build>
1415
<sourceDirectory>src/main/java</sourceDirectory>
1516
<resources>

pom.xml

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
11
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
2-
<parent>
3-
<groupId>org.sonatype.oss</groupId>
4-
<artifactId>oss-parent</artifactId>
5-
<version>5</version>
6-
</parent>
72
<modelVersion>4.0.0</modelVersion>
83
<groupId>io.swagger</groupId>
94
<artifactId>swagger-codegen-project</artifactId>
105
<packaging>pom</packaging>
116
<name>swagger-codegen-project</name>
12-
<version>2.4.44</version>
7+
<description>swagger-codegen-project</description>
138
<url>https://github.com/swagger-api/swagger-codegen</url>
9+
<version>2.4.44</version>
1410
<scm>
1511
<connection>scm:git:[email protected]:swagger-api/swagger-codegen.git</connection>
1612
<developerConnection>scm:git:[email protected]:swagger-api/swagger-codegen.git</developerConnection>
@@ -32,12 +28,6 @@
3228
<system>github</system>
3329
<url>https://github.com/swagger-api/swagger-codegen/issues</url>
3430
</issueManagement>
35-
<mailingLists>
36-
<mailingList>
37-
<name>swagger-swaggersocket</name>
38-
<archive>https://groups.google.com/forum/#!forum/swagger-swaggersocket</archive>
39-
</mailingList>
40-
</mailingLists>
4131
<licenses>
4232
<license>
4333
<name>Apache License 2.0</name>
@@ -176,12 +166,6 @@
176166
<artifactId>maven-site-plugin</artifactId>
177167
<version>3.12.0</version>
178168
</plugin>
179-
<plugin>
180-
<groupId>org.apache.maven.plugins</groupId>
181-
<artifactId>maven-release-plugin</artifactId>
182-
<version>2.5.3</version>
183-
</plugin>
184-
185169
<plugin>
186170
<groupId>org.apache.maven.plugins</groupId>
187171
<artifactId>maven-javadoc-plugin</artifactId>
@@ -237,6 +221,18 @@
237221
</execution>
238222
</executions>
239223
</plugin>
224+
<plugin>
225+
<groupId>org.sonatype.central</groupId>
226+
<artifactId>central-publishing-maven-plugin</artifactId>
227+
<version>0.7.0</version>
228+
<extensions>true</extensions>
229+
<configuration>
230+
<publishingServerId>central</publishingServerId>
231+
<autoPublish>true</autoPublish>
232+
<waitUntil>published</waitUntil>
233+
<waitMaxTime>3600</waitMaxTime>
234+
</configuration>
235+
</plugin>
240236
</plugins>
241237
<pluginManagement>
242238
<plugins>
@@ -245,6 +241,18 @@
245241
<artifactId>formatter-maven-plugin</artifactId>
246242
<version>0.5.2</version>
247243
</plugin>
244+
<plugin>
245+
<groupId>org.apache.maven.plugins</groupId>
246+
<artifactId>maven-gpg-plugin</artifactId>
247+
<version>1.6</version>
248+
<configuration>
249+
<!-- Prevent `gpg` from using pinentry programs -->
250+
<gpgArguments>
251+
<arg>--pinentry-mode</arg>
252+
<arg>loopback</arg>
253+
</gpgArguments>
254+
</configuration>
255+
</plugin>
248256
</plugins>
249257
</pluginManagement>
250258
</build>
@@ -314,7 +322,7 @@
314322
</build>
315323
</profile>
316324
<profile>
317-
<id>release-sign-artifacts</id>
325+
<id>release</id>
318326
<activation>
319327
<property>
320328
<name>performRelease</name>
@@ -1047,15 +1055,6 @@
10471055
</dependency>
10481056
</dependencies>
10491057
</dependencyManagement>
1050-
<repositories>
1051-
<repository>
1052-
<id>sonatype-snapshots</id>
1053-
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
1054-
<snapshots>
1055-
<enabled>true</enabled>
1056-
</snapshots>
1057-
</repository>
1058-
</repositories>
10591058
<properties>
10601059
<maven.compiler.release>8</maven.compiler.release>
10611060
<swagger-parser-version>1.0.71</swagger-parser-version>
@@ -1083,5 +1082,6 @@
10831082
<snakeyaml-version>2.2</snakeyaml-version>
10841083
<httpclient-version>4.5.14</httpclient-version>
10851084
<json-version>20231013</json-version>
1085+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
10861086
</properties>
10871087
</project>

0 commit comments

Comments
 (0)