Skip to content

Commit 387683b

Browse files
committed
Use Swagger BOM
This PR assumes that: 1. Springdoc release is compatible with `<swagger-api.version>` 2. Every application which use Springdoc wants compatible Swagger version and does not want risk incompatible Swagger version which may win automatic version resolution. Additional bonus for Maven multi module application is that with given BOM one module may take dependency to `io.swagger.core.v3:swagger-annotations` and other module may take dependency to `org.springdoc:springdoc-openapi-starter-webmvc-ui` without version managements, because versions are managed by Springdoc BOM
1 parent da4cb67 commit 387683b

2 files changed

Lines changed: 12 additions & 3 deletions

File tree

pom.xml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
<maven-release-plugin.version>2.5.3</maven-release-plugin.version>
5454
<central-publishing-maven-plugin.version>0.7.0
5555
</central-publishing-maven-plugin.version>
56-
<flatten-maven-plugin.version>1.5.0</flatten-maven-plugin.version>
56+
<flatten-maven-plugin.version>1.7.3</flatten-maven-plugin.version>
5757
<swagger-api.version>2.2.47</swagger-api.version>
5858
<swagger-ui.version>5.32.2</swagger-ui.version>
5959
<gmavenplus-plugin.version>1.13.1</gmavenplus-plugin.version>
@@ -70,8 +70,10 @@
7070
<!-- swagger dependencies -->
7171
<dependency>
7272
<groupId>io.swagger.core.v3</groupId>
73-
<artifactId>swagger-core-jakarta</artifactId>
73+
<artifactId>swagger-bom</artifactId>
7474
<version>${swagger-api.version}</version>
75+
<type>pom</type>
76+
<scope>import</scope>
7577
</dependency>
7678
<!-- swagger ui -->
7779
<dependency>

springdoc-openapi-bom/pom.xml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,13 @@
4545
<artifactId>springdoc-openapi-starter-webflux-scalar</artifactId>
4646
<version>${project.version}</version>
4747
</dependency>
48+
<dependency>
49+
<groupId>io.swagger.core.v3</groupId>
50+
<artifactId>swagger-bom</artifactId>
51+
<version>${swagger-api.version}</version>
52+
<type>pom</type>
53+
<scope>import</scope>
54+
</dependency>
4855
</dependencies>
4956
</dependencyManagement>
5057

@@ -69,7 +76,7 @@
6976
<pomElements>
7077
<properties>remove</properties>
7178
<distributionManagement>remove</distributionManagement>
72-
<dependencyManagement>keep</dependencyManagement>
79+
<dependencyManagement>extended_interpolate</dependencyManagement>
7380
<repositories>remove</repositories>
7481
<issueManagement>remove</issueManagement>
7582
</pomElements>

0 commit comments

Comments
 (0)