Skip to content

chore: migrate Sonatype OSSRH to Central Portal #12545

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 14 additions & 23 deletions .github/workflows/maven-master-pulls.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,17 @@ jobs:
java: [ 11 ]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Java
uses: actions/setup-java@v1
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: temurin
server-id: central
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Cache local Maven repository
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
Expand All @@ -36,34 +40,21 @@ jobs:
java: [ 8 ]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Java
uses: actions/setup-java@v1
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: temurin
server-id: central
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Cache local Maven repository
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Build with Maven
run: mvn -B -U clean verify -DskipTests -Dmaven.test.skip=true -Dmaven.site.skip=true -Dmaven.javadoc.skip=true -Psamples-java8 --file pom.xml

scan-with-lacework:
name: Trigger LaceWork Scanning
runs-on: ubuntu-latest

needs: [ build ]
if: success()

steps:
- name: Trigger LaceWork Scanning using a different method
run: |
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
env:
LW_ACCOUNT_NAME: ${{ secrets.LW_ACCOUNT_NAME }}
LW_ACCESS_TOKEN: ${{ secrets.LW_ACCESS_TOKEN }}
docker_user: ${{ secrets.DOCKERHUB_SB_USERNAME}}
docker_password: ${{ secrets.DOCKERHUB_SB_PASSWORD}}
39 changes: 19 additions & 20 deletions .github/workflows/maven-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,22 @@ jobs:
java: [ 11 ]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: temurin
cache: maven
server-id: central
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Cache local Maven repository
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
Expand All @@ -28,20 +37,6 @@ jobs:
run: |
docker login --username=${{ secrets.DOCKERHUB_SB_USERNAME }} --password=${{ secrets.DOCKERHUB_SB_PASSWORD }}
set -e
- uses: s4u/maven-settings-action@v2.8.0
name: setup maven settings.xml
with:
servers: |
[{
"id": "sonatype-nexus-staging",
"username": "${{ secrets.OSSRH_USERNAME }}",
"password": "${{ secrets.OSSRH_TOKEN }}"
},
{
"id": "sonatype-nexus-snapshots",
"username": "${{ secrets.OSSRH_USERNAME }}",
"password": "${{ secrets.OSSRH_TOKEN }}"
}]
- name: Build with Maven
run: mvn -B -U verify --file pom.xml
- name: Deploy Maven Snapshot
Expand Down Expand Up @@ -82,13 +77,17 @@ jobs:
java: [ 8 ]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Java
uses: actions/setup-java@v1
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: temurin
server-id: central
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Cache local Maven repository
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ Swagger Codegen Version | Release Date | Swagger / OpenAPI Spec compatibility

Swagger Codegen Version | Release Date | Swagger / OpenAPI Spec compatibility | Notes
-------------------------- |--------------| -------------------------- | -----
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
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
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
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

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

Expand Down
4 changes: 2 additions & 2 deletions docs/compatibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ The Swagger Codegen project has the following compatibilities with the OpenAPI S

Swagger Codegen Version | Release Date | OpenAPI Spec compatibility | Notes
-------------------------- |--------------| -------------------------- | -----
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
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
[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)
[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)
[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)
Expand Down Expand Up @@ -70,7 +70,7 @@ Swagger Codegen Version | Release Date | OpenAPI Spec compatibility | Notes
[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
[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
[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
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
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
[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)
[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)
[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)
Expand Down
2 changes: 1 addition & 1 deletion modules/swagger-codegen-cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<packaging>jar</packaging>

<name>swagger-codegen (executable)</name>

<description>swagger-codegen (executable)</description>
<build>
<finalName>swagger-codegen-cli</finalName>
<resources>
Expand Down
10 changes: 1 addition & 9 deletions modules/swagger-codegen/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<artifactId>swagger-codegen</artifactId>
<packaging>jar</packaging>
<name>swagger-codegen (core library)</name>
<description>swagger-codegen (core library)</description>
<build>
<sourceDirectory>src/main/java</sourceDirectory>
<defaultGoal>install</defaultGoal>
Expand Down Expand Up @@ -294,13 +295,4 @@
<scope>test</scope>
</dependency>
</dependencies>
<repositories>
<repository>
<id>sonatype-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
</project>
1 change: 1 addition & 0 deletions modules/swagger-generator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<artifactId>swagger-generator</artifactId>
<packaging>war</packaging>
<name>swagger-generator</name>
<description>swagger-generator</description>
<build>
<sourceDirectory>src/main/java</sourceDirectory>
<resources>
Expand Down
56 changes: 28 additions & 28 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
<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">
<parent>
<groupId>org.sonatype.oss</groupId>
<artifactId>oss-parent</artifactId>
<version>5</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>io.swagger</groupId>
<artifactId>swagger-codegen-project</artifactId>
<packaging>pom</packaging>
<name>swagger-codegen-project</name>
<version>2.4.44</version>
<description>swagger-codegen-project</description>
<url>https://github.com/swagger-api/swagger-codegen</url>
<version>2.4.44</version>
<scm>
<connection>scm:git:git@github.com:swagger-api/swagger-codegen.git</connection>
<developerConnection>scm:git:git@github.com:swagger-api/swagger-codegen.git</developerConnection>
Expand All @@ -32,12 +28,6 @@
<system>github</system>
<url>https://github.com/swagger-api/swagger-codegen/issues</url>
</issueManagement>
<mailingLists>
<mailingList>
<name>swagger-swaggersocket</name>
<archive>https://groups.google.com/forum/#!forum/swagger-swaggersocket</archive>
</mailingList>
</mailingLists>
<licenses>
<license>
<name>Apache License 2.0</name>
Expand Down Expand Up @@ -176,12 +166,6 @@
<artifactId>maven-site-plugin</artifactId>
<version>3.12.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.3</version>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
Expand Down Expand Up @@ -237,6 +221,18 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>0.7.0</version>
<extensions>true</extensions>
<configuration>
<publishingServerId>central</publishingServerId>
<autoPublish>true</autoPublish>
<waitUntil>published</waitUntil>
<waitMaxTime>3600</waitMaxTime>
</configuration>
</plugin>
</plugins>
<pluginManagement>
<plugins>
Expand All @@ -245,6 +241,18 @@
<artifactId>formatter-maven-plugin</artifactId>
<version>0.5.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.6</version>
<configuration>
<!-- Prevent `gpg` from using pinentry programs -->
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
Expand Down Expand Up @@ -314,7 +322,7 @@
</build>
</profile>
<profile>
<id>release-sign-artifacts</id>
<id>release</id>
<activation>
<property>
<name>performRelease</name>
Expand Down Expand Up @@ -1047,15 +1055,6 @@
</dependency>
</dependencies>
</dependencyManagement>
<repositories>
<repository>
<id>sonatype-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<properties>
<maven.compiler.release>8</maven.compiler.release>
<swagger-parser-version>1.0.71</swagger-parser-version>
Expand Down Expand Up @@ -1083,5 +1082,6 @@
<snakeyaml-version>2.2</snakeyaml-version>
<httpclient-version>4.5.14</httpclient-version>
<json-version>20231013</json-version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
</project>